diff --git a/Cargo.toml b/Cargo.toml index 11c8d82..bc85ef7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ bluer = { version = "0.16.1", features = ["bluetoothd"] } tokio = { version = "1.20.1", features = ["rt-multi-thread"] } [target.'cfg(target_os = "android")'.dependencies] -java-spaghetti = "0.1.0" +java-spaghetti = "0.2.0" async-channel = "2.2.0" [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] diff --git a/src/android/adapter.rs b/src/android/adapter.rs index 78244b2..e51c23f 100644 --- a/src/android/adapter.rs +++ b/src/android/adapter.rs @@ -7,7 +7,7 @@ use std::task::{Context, Poll}; use async_channel::{Receiver, Sender}; use futures_core::Stream; use futures_lite::{stream, StreamExt}; -use java_spaghetti::{Arg, ByteArray, Env, Global, Local, PrimitiveArray, VM}; +use java_spaghetti::{Arg, ByteArray, Env, Global, Local, Null, PrimitiveArray, VM}; use tracing::{debug, warn}; use uuid::Uuid; @@ -86,13 +86,13 @@ impl AdapterImpl { let settings = ScanSettings_Builder::new(env)?; settings.setScanMode(ScanSettings::SCAN_MODE_LOW_LATENCY)?; let settings = settings.build()?.non_null()?; - scanner.startScan_List_ScanSettings_ScanCallback(None, &*settings, &**callback)?; + scanner.startScan_List_ScanSettings_ScanCallback(Null, settings, callback)?; let guard = defer(move || { self.inner.manager.vm().with_env(|env| { let callback = callback_global.as_ref(env); let scanner = self.inner.le_scanner.as_ref(env); - match scanner.stopScan_ScanCallback(&**callback) { + match scanner.stopScan_ScanCallback(callback) { Ok(()) => debug!("stopped scan"), Err(e) => warn!("failed to stop scan: {:?}", e), }; diff --git a/src/android/bindings.rs b/src/android/bindings.rs index 6ed0755..d2a0d91 100644 --- a/src/android/bindings.rs +++ b/src/android/bindings.rs @@ -130,8723 +130,14966 @@ pub mod android { pub mod le { - ::java_spaghetti::class! { - /// public class [AdvertiseCallback](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html) - public class AdvertiseCallback ("android/bluetooth/le/AdvertiseCallback\0") extends super::super::super::java::lang::Object { - - /// [AdvertiseCallback](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#AdvertiseCallback()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseCallback\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// pub class [AdvertiseCallback](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html) + #[repr(transparent)] + pub struct AdvertiseCallback(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for AdvertiseCallback {} + + unsafe impl ::java_spaghetti::JniType for AdvertiseCallback { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/AdvertiseCallback\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for AdvertiseCallback {} + impl ::std::ops::Deref for AdvertiseCallback { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl AdvertiseCallback { + /// [AdvertiseCallback](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#AdvertiseCallback()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseCallback\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [onStartSuccess](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#onStartSuccess(android.bluetooth.le.AdvertiseSettings)) - pub fn onStartSuccess<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseSettings>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseCallback", java.flags == PUBLIC, .name == "onStartSuccess", .descriptor == "(Landroid/bluetooth/le/AdvertiseSettings;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseCallback\0", "onStartSuccess\0", "(Landroid/bluetooth/le/AdvertiseSettings;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onStartSuccess](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#onStartSuccess(android.bluetooth.le.AdvertiseSettings)) + pub fn onStartSuccess<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertiseCallback", java.flags == PUBLIC, .name == "onStartSuccess", .descriptor == "(Landroid/bluetooth/le/AdvertiseSettings;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseCallback\0", + "onStartSuccess\0", + "(Landroid/bluetooth/le/AdvertiseSettings;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onStartFailure](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#onStartFailure(int)) - pub fn onStartFailure<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseCallback", java.flags == PUBLIC, .name == "onStartFailure", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseCallback\0", "onStartFailure\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onStartFailure](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#onStartFailure(int)) + pub fn onStartFailure<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertiseCallback", java.flags == PUBLIC, .name == "onStartFailure", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseCallback\0", + "onStartFailure\0", + "(I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [ADVERTISE_FAILED_ALREADY_STARTED](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_ALREADY_STARTED) - pub const ADVERTISE_FAILED_ALREADY_STARTED : i32 = 3; + /// public static final [ADVERTISE_FAILED_ALREADY_STARTED](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_ALREADY_STARTED) + pub const ADVERTISE_FAILED_ALREADY_STARTED: i32 = 3; - /// public static final [ADVERTISE_FAILED_DATA_TOO_LARGE](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_DATA_TOO_LARGE) - pub const ADVERTISE_FAILED_DATA_TOO_LARGE : i32 = 1; + /// public static final [ADVERTISE_FAILED_DATA_TOO_LARGE](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_DATA_TOO_LARGE) + pub const ADVERTISE_FAILED_DATA_TOO_LARGE: i32 = 1; - /// public static final [ADVERTISE_FAILED_FEATURE_UNSUPPORTED](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_FEATURE_UNSUPPORTED) - pub const ADVERTISE_FAILED_FEATURE_UNSUPPORTED : i32 = 5; + /// public static final [ADVERTISE_FAILED_FEATURE_UNSUPPORTED](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_FEATURE_UNSUPPORTED) + pub const ADVERTISE_FAILED_FEATURE_UNSUPPORTED: i32 = 5; - /// public static final [ADVERTISE_FAILED_INTERNAL_ERROR](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_INTERNAL_ERROR) - pub const ADVERTISE_FAILED_INTERNAL_ERROR : i32 = 4; + /// public static final [ADVERTISE_FAILED_INTERNAL_ERROR](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_INTERNAL_ERROR) + pub const ADVERTISE_FAILED_INTERNAL_ERROR: i32 = 4; - /// public static final [ADVERTISE_FAILED_TOO_MANY_ADVERTISERS](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_TOO_MANY_ADVERTISERS) - pub const ADVERTISE_FAILED_TOO_MANY_ADVERTISERS : i32 = 2; - } + /// public static final [ADVERTISE_FAILED_TOO_MANY_ADVERTISERS](https://developer.android.com/reference/android/bluetooth/le/AdvertiseCallback.html#ADVERTISE_FAILED_TOO_MANY_ADVERTISERS) + pub const ADVERTISE_FAILED_TOO_MANY_ADVERTISERS: i32 = 2; } - ::java_spaghetti::class! { - /// public final class [AdvertiseData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html) - public final class AdvertiseData ("android/bluetooth/le/AdvertiseData\0") extends super::super::super::java::lang::Object, implements super::super::os::Parcelable { + /// pub final class [AdvertiseData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html) + #[repr(transparent)] + pub struct AdvertiseData(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for AdvertiseData {} - /// [getServiceUuids](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getServiceUuids()) - pub fn getServiceUuids<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getServiceUuids", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "getServiceUuids\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for AdvertiseData { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/AdvertiseData\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for AdvertiseData {} + unsafe impl ::java_spaghetti::AssignableTo for AdvertiseData {} + impl ::std::ops::Deref for AdvertiseData { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for AdvertiseData { + fn as_ref(&self) -> &super::super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::super::os::Parcelable) } + } + } + impl AdvertiseData { + /// [getServiceUuids](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getServiceUuids()) + pub fn getServiceUuids<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getServiceUuids", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "getServiceUuids\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceSolicitationUuids](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getServiceSolicitationUuids()) - pub fn getServiceSolicitationUuids<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getServiceSolicitationUuids", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "getServiceSolicitationUuids\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceSolicitationUuids](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getServiceSolicitationUuids()) + pub fn getServiceSolicitationUuids<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getServiceSolicitationUuids", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "getServiceSolicitationUuids\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getTransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getTransportDiscoveryData()) - pub fn getTransportDiscoveryData<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getTransportDiscoveryData", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "getTransportDiscoveryData\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getTransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getTransportDiscoveryData()) + pub fn getTransportDiscoveryData<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getTransportDiscoveryData", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "getTransportDiscoveryData\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getManufacturerSpecificData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getManufacturerSpecificData()) - pub fn getManufacturerSpecificData<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::util::SparseArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getManufacturerSpecificData", .descriptor == "()Landroid/util/SparseArray;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "getManufacturerSpecificData\0", "()Landroid/util/SparseArray;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getManufacturerSpecificData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getManufacturerSpecificData()) + pub fn getManufacturerSpecificData<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::util::SparseArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getManufacturerSpecificData", .descriptor == "()Landroid/util/SparseArray;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "getManufacturerSpecificData\0", + "()Landroid/util/SparseArray;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getServiceData()) - pub fn getServiceData<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::Map>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getServiceData", .descriptor == "()Ljava/util/Map;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "getServiceData\0", "()Ljava/util/Map;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getServiceData()) + pub fn getServiceData<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::Map>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getServiceData", .descriptor == "()Ljava/util/Map;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "getServiceData\0", + "()Ljava/util/Map;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getIncludeTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getIncludeTxPowerLevel()) - pub fn getIncludeTxPowerLevel<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getIncludeTxPowerLevel", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "getIncludeTxPowerLevel\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getIncludeTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getIncludeTxPowerLevel()) + pub fn getIncludeTxPowerLevel<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getIncludeTxPowerLevel", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "getIncludeTxPowerLevel\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getIncludeDeviceName](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getIncludeDeviceName()) - pub fn getIncludeDeviceName<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getIncludeDeviceName", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "getIncludeDeviceName\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getIncludeDeviceName](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#getIncludeDeviceName()) + pub fn getIncludeDeviceName<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "getIncludeDeviceName", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "getIncludeDeviceName\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "hashCode\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertiseData", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [AdvertiseData.Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html) - public final class AdvertiseData_Builder ("android/bluetooth/le/AdvertiseData$Builder\0") extends super::super::super::java::lang::Object { + /// pub final class [AdvertiseData.Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html) + #[repr(transparent)] + pub struct AdvertiseData_Builder(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for AdvertiseData_Builder {} - /// [Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#Builder()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for AdvertiseData_Builder { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/AdvertiseData$Builder\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for AdvertiseData_Builder {} + impl ::std::ops::Deref for AdvertiseData_Builder { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl AdvertiseData_Builder { + /// [Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#Builder()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData$Builder\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [addServiceUuid](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addServiceUuid(android.os.ParcelUuid)) - pub fn addServiceUuid<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addServiceUuid", .descriptor == "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/AdvertiseData$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "addServiceUuid\0", "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/AdvertiseData$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addServiceUuid](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addServiceUuid(android.os.ParcelUuid)) + pub fn addServiceUuid<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addServiceUuid", .descriptor == "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/AdvertiseData$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData$Builder\0", + "addServiceUuid\0", + "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/AdvertiseData$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [addServiceSolicitationUuid](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addServiceSolicitationUuid(android.os.ParcelUuid)) - pub fn addServiceSolicitationUuid<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addServiceSolicitationUuid", .descriptor == "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/AdvertiseData$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "addServiceSolicitationUuid\0", "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/AdvertiseData$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addServiceSolicitationUuid](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addServiceSolicitationUuid(android.os.ParcelUuid)) + pub fn addServiceSolicitationUuid<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addServiceSolicitationUuid", .descriptor == "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/AdvertiseData$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData$Builder\0", + "addServiceSolicitationUuid\0", + "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/AdvertiseData$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [addServiceData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addServiceData(android.os.ParcelUuid,%20byte%5B%5D)) - pub fn addServiceData<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addServiceData", .descriptor == "(Landroid/os/ParcelUuid;[B)Landroid/bluetooth/le/AdvertiseData$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "addServiceData\0", "(Landroid/os/ParcelUuid;[B)Landroid/bluetooth/le/AdvertiseData$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addServiceData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addServiceData(android.os.ParcelUuid,%20byte%5B%5D)) + pub fn addServiceData<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addServiceData", .descriptor == "(Landroid/os/ParcelUuid;[B)Landroid/bluetooth/le/AdvertiseData$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData$Builder\0", + "addServiceData\0", + "(Landroid/os/ParcelUuid;[B)Landroid/bluetooth/le/AdvertiseData$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [addTransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addTransportDiscoveryData(android.bluetooth.le.TransportDiscoveryData)) - pub fn addTransportDiscoveryData<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env TransportDiscoveryData>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addTransportDiscoveryData", .descriptor == "(Landroid/bluetooth/le/TransportDiscoveryData;)Landroid/bluetooth/le/AdvertiseData$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "addTransportDiscoveryData\0", "(Landroid/bluetooth/le/TransportDiscoveryData;)Landroid/bluetooth/le/AdvertiseData$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addTransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addTransportDiscoveryData(android.bluetooth.le.TransportDiscoveryData)) + pub fn addTransportDiscoveryData<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addTransportDiscoveryData", .descriptor == "(Landroid/bluetooth/le/TransportDiscoveryData;)Landroid/bluetooth/le/AdvertiseData$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "addTransportDiscoveryData\0", "(Landroid/bluetooth/le/TransportDiscoveryData;)Landroid/bluetooth/le/AdvertiseData$Builder;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [addManufacturerData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addManufacturerData(int,%20byte%5B%5D)) - pub fn addManufacturerData<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addManufacturerData", .descriptor == "(I[B)Landroid/bluetooth/le/AdvertiseData$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "addManufacturerData\0", "(I[B)Landroid/bluetooth/le/AdvertiseData$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addManufacturerData](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#addManufacturerData(int,%20byte%5B%5D)) + pub fn addManufacturerData<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "addManufacturerData", .descriptor == "(I[B)Landroid/bluetooth/le/AdvertiseData$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData$Builder\0", + "addManufacturerData\0", + "(I[B)Landroid/bluetooth/le/AdvertiseData$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setIncludeTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#setIncludeTxPowerLevel(boolean)) - pub fn setIncludeTxPowerLevel<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "setIncludeTxPowerLevel", .descriptor == "(Z)Landroid/bluetooth/le/AdvertiseData$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "setIncludeTxPowerLevel\0", "(Z)Landroid/bluetooth/le/AdvertiseData$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setIncludeTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#setIncludeTxPowerLevel(boolean)) + pub fn setIncludeTxPowerLevel<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "setIncludeTxPowerLevel", .descriptor == "(Z)Landroid/bluetooth/le/AdvertiseData$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData$Builder\0", + "setIncludeTxPowerLevel\0", + "(Z)Landroid/bluetooth/le/AdvertiseData$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setIncludeDeviceName](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#setIncludeDeviceName(boolean)) - pub fn setIncludeDeviceName<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "setIncludeDeviceName", .descriptor == "(Z)Landroid/bluetooth/le/AdvertiseData$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "setIncludeDeviceName\0", "(Z)Landroid/bluetooth/le/AdvertiseData$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setIncludeDeviceName](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#setIncludeDeviceName(boolean)) + pub fn setIncludeDeviceName<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "setIncludeDeviceName", .descriptor == "(Z)Landroid/bluetooth/le/AdvertiseData$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData$Builder\0", + "setIncludeDeviceName\0", + "(Z)Landroid/bluetooth/le/AdvertiseData$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [build](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#build()) - pub fn build<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/AdvertiseData;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseData$Builder\0", "build\0", "()Landroid/bluetooth/le/AdvertiseData;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [build](https://developer.android.com/reference/android/bluetooth/le/AdvertiseData.Builder.html#build()) + pub fn build<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseData>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseData$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/AdvertiseData;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseData$Builder\0", + "build\0", + "()Landroid/bluetooth/le/AdvertiseData;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [AdvertiseSettings](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html) - public final class AdvertiseSettings ("android/bluetooth/le/AdvertiseSettings\0") extends super::super::super::java::lang::Object, implements super::super::os::Parcelable { + /// pub final class [AdvertiseSettings](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html) + #[repr(transparent)] + pub struct AdvertiseSettings(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for AdvertiseSettings {} - /// [getMode](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#getMode()) - pub fn getMode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "getMode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings\0", "getMode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for AdvertiseSettings { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/AdvertiseSettings\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for AdvertiseSettings {} + unsafe impl ::java_spaghetti::AssignableTo for AdvertiseSettings {} + impl ::std::ops::Deref for AdvertiseSettings { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for AdvertiseSettings { + fn as_ref(&self) -> &super::super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::super::os::Parcelable) } + } + } + impl AdvertiseSettings { + /// [getMode](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#getMode()) + pub fn getMode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "getMode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings\0", + "getMode\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#getTxPowerLevel()) - pub fn getTxPowerLevel<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "getTxPowerLevel", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings\0", "getTxPowerLevel\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#getTxPowerLevel()) + pub fn getTxPowerLevel<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "getTxPowerLevel", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings\0", + "getTxPowerLevel\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isConnectable](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#isConnectable()) - pub fn isConnectable<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "isConnectable", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings\0", "isConnectable\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isConnectable](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#isConnectable()) + pub fn isConnectable<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "isConnectable", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings\0", + "isConnectable\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getTimeout](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#getTimeout()) - pub fn getTimeout<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "getTimeout", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings\0", "getTimeout\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getTimeout](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#getTimeout()) + pub fn getTimeout<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "getTimeout", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings\0", + "getTimeout\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertiseSettings", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [ADVERTISE_MODE_BALANCED](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_MODE_BALANCED) - pub const ADVERTISE_MODE_BALANCED : i32 = 1; + /// public static final [ADVERTISE_MODE_BALANCED](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_MODE_BALANCED) + pub const ADVERTISE_MODE_BALANCED: i32 = 1; - /// public static final [ADVERTISE_MODE_LOW_LATENCY](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_MODE_LOW_LATENCY) - pub const ADVERTISE_MODE_LOW_LATENCY : i32 = 2; + /// public static final [ADVERTISE_MODE_LOW_LATENCY](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_MODE_LOW_LATENCY) + pub const ADVERTISE_MODE_LOW_LATENCY: i32 = 2; - /// public static final [ADVERTISE_MODE_LOW_POWER](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_MODE_LOW_POWER) - pub const ADVERTISE_MODE_LOW_POWER : i32 = 0; + /// public static final [ADVERTISE_MODE_LOW_POWER](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_MODE_LOW_POWER) + pub const ADVERTISE_MODE_LOW_POWER: i32 = 0; - /// public static final [ADVERTISE_TX_POWER_HIGH](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_TX_POWER_HIGH) - pub const ADVERTISE_TX_POWER_HIGH : i32 = 3; + /// public static final [ADVERTISE_TX_POWER_HIGH](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_TX_POWER_HIGH) + pub const ADVERTISE_TX_POWER_HIGH: i32 = 3; - /// public static final [ADVERTISE_TX_POWER_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_TX_POWER_LOW) - pub const ADVERTISE_TX_POWER_LOW : i32 = 1; + /// public static final [ADVERTISE_TX_POWER_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_TX_POWER_LOW) + pub const ADVERTISE_TX_POWER_LOW: i32 = 1; - /// public static final [ADVERTISE_TX_POWER_MEDIUM](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_TX_POWER_MEDIUM) - pub const ADVERTISE_TX_POWER_MEDIUM : i32 = 2; + /// public static final [ADVERTISE_TX_POWER_MEDIUM](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_TX_POWER_MEDIUM) + pub const ADVERTISE_TX_POWER_MEDIUM: i32 = 2; - /// public static final [ADVERTISE_TX_POWER_ULTRA_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_TX_POWER_ULTRA_LOW) - pub const ADVERTISE_TX_POWER_ULTRA_LOW : i32 = 0; - } + /// public static final [ADVERTISE_TX_POWER_ULTRA_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.html#ADVERTISE_TX_POWER_ULTRA_LOW) + pub const ADVERTISE_TX_POWER_ULTRA_LOW: i32 = 0; } - ::java_spaghetti::class! { - /// public final class [AdvertiseSettings.Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html) - public final class AdvertiseSettings_Builder ("android/bluetooth/le/AdvertiseSettings$Builder\0") extends super::super::super::java::lang::Object { + /// pub final class [AdvertiseSettings.Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html) + #[repr(transparent)] + pub struct AdvertiseSettings_Builder(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for AdvertiseSettings_Builder {} - /// [Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#Builder()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings$Builder\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for AdvertiseSettings_Builder { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/AdvertiseSettings$Builder\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for AdvertiseSettings_Builder {} + impl ::std::ops::Deref for AdvertiseSettings_Builder { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl AdvertiseSettings_Builder { + /// [Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#Builder()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings$Builder\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [setAdvertiseMode](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#setAdvertiseMode(int)) - pub fn setAdvertiseMode<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "setAdvertiseMode", .descriptor == "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings$Builder\0", "setAdvertiseMode\0", "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setAdvertiseMode](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#setAdvertiseMode(int)) + pub fn setAdvertiseMode<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "setAdvertiseMode", .descriptor == "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings$Builder\0", + "setAdvertiseMode\0", + "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#setTxPowerLevel(int)) - pub fn setTxPowerLevel<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "setTxPowerLevel", .descriptor == "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings$Builder\0", "setTxPowerLevel\0", "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#setTxPowerLevel(int)) + pub fn setTxPowerLevel<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "setTxPowerLevel", .descriptor == "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings$Builder\0", + "setTxPowerLevel\0", + "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setConnectable](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#setConnectable(boolean)) - pub fn setConnectable<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "setConnectable", .descriptor == "(Z)Landroid/bluetooth/le/AdvertiseSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings$Builder\0", "setConnectable\0", "(Z)Landroid/bluetooth/le/AdvertiseSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setConnectable](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#setConnectable(boolean)) + pub fn setConnectable<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "setConnectable", .descriptor == "(Z)Landroid/bluetooth/le/AdvertiseSettings$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings$Builder\0", + "setConnectable\0", + "(Z)Landroid/bluetooth/le/AdvertiseSettings$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setTimeout](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#setTimeout(int)) - pub fn setTimeout<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "setTimeout", .descriptor == "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings$Builder\0", "setTimeout\0", "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setTimeout](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#setTimeout(int)) + pub fn setTimeout<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "setTimeout", .descriptor == "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings$Builder\0", + "setTimeout\0", + "(I)Landroid/bluetooth/le/AdvertiseSettings$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [build](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#build()) - pub fn build<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/AdvertiseSettings;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertiseSettings$Builder\0", "build\0", "()Landroid/bluetooth/le/AdvertiseSettings;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [build](https://developer.android.com/reference/android/bluetooth/le/AdvertiseSettings.Builder.html#build()) + pub fn build<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertiseSettings>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertiseSettings$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/AdvertiseSettings;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertiseSettings$Builder\0", + "build\0", + "()Landroid/bluetooth/le/AdvertiseSettings;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [AdvertisingSet](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html) - public final class AdvertisingSet ("android/bluetooth/le/AdvertisingSet\0") extends super::super::super::java::lang::Object { + /// pub final class [AdvertisingSet](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html) + #[repr(transparent)] + pub struct AdvertisingSet(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for AdvertisingSet {} - /// [enableAdvertising](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#enableAdvertising(boolean,%20int,%20int)) - pub fn enableAdvertising<'env>(&'env self, arg0: bool, arg1: i32, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "enableAdvertising", .descriptor == "(ZII)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSet\0", "enableAdvertising\0", "(ZII)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for AdvertisingSet { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/AdvertisingSet\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for AdvertisingSet {} + impl ::std::ops::Deref for AdvertisingSet { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl AdvertisingSet { + /// [enableAdvertising](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#enableAdvertising(boolean,%20int,%20int)) + pub fn enableAdvertising<'env>( + &'env self, + arg0: bool, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "enableAdvertising", .descriptor == "(ZII)V" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSet\0", + "enableAdvertising\0", + "(ZII)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setAdvertisingData](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setAdvertisingData(android.bluetooth.le.AdvertiseData)) - pub fn setAdvertisingData<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setAdvertisingData", .descriptor == "(Landroid/bluetooth/le/AdvertiseData;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSet\0", "setAdvertisingData\0", "(Landroid/bluetooth/le/AdvertiseData;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setAdvertisingData](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setAdvertisingData(android.bluetooth.le.AdvertiseData)) + pub fn setAdvertisingData<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setAdvertisingData", .descriptor == "(Landroid/bluetooth/le/AdvertiseData;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSet\0", + "setAdvertisingData\0", + "(Landroid/bluetooth/le/AdvertiseData;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setScanResponseData](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setScanResponseData(android.bluetooth.le.AdvertiseData)) - pub fn setScanResponseData<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setScanResponseData", .descriptor == "(Landroid/bluetooth/le/AdvertiseData;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSet\0", "setScanResponseData\0", "(Landroid/bluetooth/le/AdvertiseData;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setScanResponseData](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setScanResponseData(android.bluetooth.le.AdvertiseData)) + pub fn setScanResponseData<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setScanResponseData", .descriptor == "(Landroid/bluetooth/le/AdvertiseData;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSet\0", + "setScanResponseData\0", + "(Landroid/bluetooth/le/AdvertiseData;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setAdvertisingParameters](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setAdvertisingParameters(android.bluetooth.le.AdvertisingSetParameters)) - pub fn setAdvertisingParameters<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSetParameters>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setAdvertisingParameters", .descriptor == "(Landroid/bluetooth/le/AdvertisingSetParameters;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSet\0", "setAdvertisingParameters\0", "(Landroid/bluetooth/le/AdvertisingSetParameters;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setAdvertisingParameters](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setAdvertisingParameters(android.bluetooth.le.AdvertisingSetParameters)) + pub fn setAdvertisingParameters<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setAdvertisingParameters", .descriptor == "(Landroid/bluetooth/le/AdvertisingSetParameters;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSet\0", + "setAdvertisingParameters\0", + "(Landroid/bluetooth/le/AdvertisingSetParameters;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setPeriodicAdvertisingParameters](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setPeriodicAdvertisingParameters(android.bluetooth.le.PeriodicAdvertisingParameters)) - pub fn setPeriodicAdvertisingParameters<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env PeriodicAdvertisingParameters>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setPeriodicAdvertisingParameters", .descriptor == "(Landroid/bluetooth/le/PeriodicAdvertisingParameters;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSet\0", "setPeriodicAdvertisingParameters\0", "(Landroid/bluetooth/le/PeriodicAdvertisingParameters;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setPeriodicAdvertisingParameters](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setPeriodicAdvertisingParameters(android.bluetooth.le.PeriodicAdvertisingParameters)) + pub fn setPeriodicAdvertisingParameters<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setPeriodicAdvertisingParameters", .descriptor == "(Landroid/bluetooth/le/PeriodicAdvertisingParameters;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSet\0", + "setPeriodicAdvertisingParameters\0", + "(Landroid/bluetooth/le/PeriodicAdvertisingParameters;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setPeriodicAdvertisingData](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setPeriodicAdvertisingData(android.bluetooth.le.AdvertiseData)) - pub fn setPeriodicAdvertisingData<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setPeriodicAdvertisingData", .descriptor == "(Landroid/bluetooth/le/AdvertiseData;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSet\0", "setPeriodicAdvertisingData\0", "(Landroid/bluetooth/le/AdvertiseData;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setPeriodicAdvertisingData](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setPeriodicAdvertisingData(android.bluetooth.le.AdvertiseData)) + pub fn setPeriodicAdvertisingData<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setPeriodicAdvertisingData", .descriptor == "(Landroid/bluetooth/le/AdvertiseData;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSet\0", + "setPeriodicAdvertisingData\0", + "(Landroid/bluetooth/le/AdvertiseData;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setPeriodicAdvertisingEnabled](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setPeriodicAdvertisingEnabled(boolean)) - pub fn setPeriodicAdvertisingEnabled<'env>(&'env self, arg0: bool) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setPeriodicAdvertisingEnabled", .descriptor == "(Z)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSet\0", "setPeriodicAdvertisingEnabled\0", "(Z)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setPeriodicAdvertisingEnabled](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSet.html#setPeriodicAdvertisingEnabled(boolean)) + pub fn setPeriodicAdvertisingEnabled<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSet", java.flags == PUBLIC, .name == "setPeriodicAdvertisingEnabled", .descriptor == "(Z)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSet\0", + "setPeriodicAdvertisingEnabled\0", + "(Z)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public class [AdvertisingSetCallback](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html) - public class AdvertisingSetCallback ("android/bluetooth/le/AdvertisingSetCallback\0") extends super::super::super::java::lang::Object { + /// pub class [AdvertisingSetCallback](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html) + #[repr(transparent)] + pub struct AdvertisingSetCallback(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for AdvertisingSetCallback {} - /// [AdvertisingSetCallback](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#AdvertisingSetCallback()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } - } - - /// [onAdvertisingSetStarted](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingSetStarted(android.bluetooth.le.AdvertisingSet,%20int,%20int)) - pub fn onAdvertisingSetStarted<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSet>>, arg1: i32, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingSetStarted", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;II)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "onAdvertisingSetStarted\0", "(Landroid/bluetooth/le/AdvertisingSet;II)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for AdvertisingSetCallback { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/AdvertisingSetCallback\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for AdvertisingSetCallback {} + impl ::std::ops::Deref for AdvertisingSetCallback { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl AdvertisingSetCallback { + /// [AdvertisingSetCallback](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#AdvertisingSetCallback()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [onAdvertisingSetStopped](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingSetStopped(android.bluetooth.le.AdvertisingSet)) - pub fn onAdvertisingSetStopped<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSet>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingSetStopped", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "onAdvertisingSetStopped\0", "(Landroid/bluetooth/le/AdvertisingSet;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onAdvertisingSetStarted](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingSetStarted(android.bluetooth.le.AdvertisingSet,%20int,%20int)) + pub fn onAdvertisingSetStarted<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingSetStarted", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;II)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "onAdvertisingSetStarted\0", + "(Landroid/bluetooth/le/AdvertisingSet;II)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onAdvertisingEnabled](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingEnabled(android.bluetooth.le.AdvertisingSet,%20boolean,%20int)) - pub fn onAdvertisingEnabled<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSet>>, arg1: bool, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingEnabled", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;ZI)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "onAdvertisingEnabled\0", "(Landroid/bluetooth/le/AdvertisingSet;ZI)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onAdvertisingSetStopped](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingSetStopped(android.bluetooth.le.AdvertisingSet)) + pub fn onAdvertisingSetStopped<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingSetStopped", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "onAdvertisingSetStopped\0", + "(Landroid/bluetooth/le/AdvertisingSet;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onAdvertisingDataSet](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingDataSet(android.bluetooth.le.AdvertisingSet,%20int)) - pub fn onAdvertisingDataSet<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSet>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingDataSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "onAdvertisingDataSet\0", "(Landroid/bluetooth/le/AdvertisingSet;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onAdvertisingEnabled](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingEnabled(android.bluetooth.le.AdvertisingSet,%20boolean,%20int)) + pub fn onAdvertisingEnabled<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: bool, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingEnabled", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;ZI)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "onAdvertisingEnabled\0", + "(Landroid/bluetooth/le/AdvertisingSet;ZI)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onScanResponseDataSet](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onScanResponseDataSet(android.bluetooth.le.AdvertisingSet,%20int)) - pub fn onScanResponseDataSet<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSet>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onScanResponseDataSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "onScanResponseDataSet\0", "(Landroid/bluetooth/le/AdvertisingSet;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onAdvertisingDataSet](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingDataSet(android.bluetooth.le.AdvertisingSet,%20int)) + pub fn onAdvertisingDataSet<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingDataSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "onAdvertisingDataSet\0", + "(Landroid/bluetooth/le/AdvertisingSet;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onAdvertisingParametersUpdated](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingParametersUpdated(android.bluetooth.le.AdvertisingSet,%20int,%20int)) - pub fn onAdvertisingParametersUpdated<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSet>>, arg1: i32, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingParametersUpdated", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;II)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "onAdvertisingParametersUpdated\0", "(Landroid/bluetooth/le/AdvertisingSet;II)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onScanResponseDataSet](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onScanResponseDataSet(android.bluetooth.le.AdvertisingSet,%20int)) + pub fn onScanResponseDataSet<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onScanResponseDataSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "onScanResponseDataSet\0", + "(Landroid/bluetooth/le/AdvertisingSet;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onPeriodicAdvertisingParametersUpdated](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onPeriodicAdvertisingParametersUpdated(android.bluetooth.le.AdvertisingSet,%20int)) - pub fn onPeriodicAdvertisingParametersUpdated<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSet>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onPeriodicAdvertisingParametersUpdated", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "onPeriodicAdvertisingParametersUpdated\0", "(Landroid/bluetooth/le/AdvertisingSet;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onAdvertisingParametersUpdated](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onAdvertisingParametersUpdated(android.bluetooth.le.AdvertisingSet,%20int,%20int)) + pub fn onAdvertisingParametersUpdated<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onAdvertisingParametersUpdated", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;II)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "onAdvertisingParametersUpdated\0", + "(Landroid/bluetooth/le/AdvertisingSet;II)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onPeriodicAdvertisingDataSet](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onPeriodicAdvertisingDataSet(android.bluetooth.le.AdvertisingSet,%20int)) - pub fn onPeriodicAdvertisingDataSet<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSet>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onPeriodicAdvertisingDataSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "onPeriodicAdvertisingDataSet\0", "(Landroid/bluetooth/le/AdvertisingSet;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onPeriodicAdvertisingParametersUpdated](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onPeriodicAdvertisingParametersUpdated(android.bluetooth.le.AdvertisingSet,%20int)) + pub fn onPeriodicAdvertisingParametersUpdated<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onPeriodicAdvertisingParametersUpdated", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "onPeriodicAdvertisingParametersUpdated\0", + "(Landroid/bluetooth/le/AdvertisingSet;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onPeriodicAdvertisingEnabled](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onPeriodicAdvertisingEnabled(android.bluetooth.le.AdvertisingSet,%20boolean,%20int)) - pub fn onPeriodicAdvertisingEnabled<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSet>>, arg1: bool, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onPeriodicAdvertisingEnabled", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;ZI)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetCallback\0", "onPeriodicAdvertisingEnabled\0", "(Landroid/bluetooth/le/AdvertisingSet;ZI)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onPeriodicAdvertisingDataSet](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onPeriodicAdvertisingDataSet(android.bluetooth.le.AdvertisingSet,%20int)) + pub fn onPeriodicAdvertisingDataSet<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onPeriodicAdvertisingDataSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "onPeriodicAdvertisingDataSet\0", + "(Landroid/bluetooth/le/AdvertisingSet;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } + + /// [onPeriodicAdvertisingEnabled](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#onPeriodicAdvertisingEnabled(android.bluetooth.le.AdvertisingSet,%20boolean,%20int)) + pub fn onPeriodicAdvertisingEnabled<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: bool, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/AdvertisingSetCallback", java.flags == PUBLIC, .name == "onPeriodicAdvertisingEnabled", .descriptor == "(Landroid/bluetooth/le/AdvertisingSet;ZI)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetCallback\0", + "onPeriodicAdvertisingEnabled\0", + "(Landroid/bluetooth/le/AdvertisingSet;ZI)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [ADVERTISE_FAILED_ALREADY_STARTED](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_ALREADY_STARTED) - pub const ADVERTISE_FAILED_ALREADY_STARTED : i32 = 3; + /// public static final [ADVERTISE_FAILED_ALREADY_STARTED](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_ALREADY_STARTED) + pub const ADVERTISE_FAILED_ALREADY_STARTED: i32 = 3; - /// public static final [ADVERTISE_FAILED_DATA_TOO_LARGE](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_DATA_TOO_LARGE) - pub const ADVERTISE_FAILED_DATA_TOO_LARGE : i32 = 1; + /// public static final [ADVERTISE_FAILED_DATA_TOO_LARGE](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_DATA_TOO_LARGE) + pub const ADVERTISE_FAILED_DATA_TOO_LARGE: i32 = 1; - /// public static final [ADVERTISE_FAILED_FEATURE_UNSUPPORTED](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_FEATURE_UNSUPPORTED) - pub const ADVERTISE_FAILED_FEATURE_UNSUPPORTED : i32 = 5; + /// public static final [ADVERTISE_FAILED_FEATURE_UNSUPPORTED](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_FEATURE_UNSUPPORTED) + pub const ADVERTISE_FAILED_FEATURE_UNSUPPORTED: i32 = 5; - /// public static final [ADVERTISE_FAILED_INTERNAL_ERROR](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_INTERNAL_ERROR) - pub const ADVERTISE_FAILED_INTERNAL_ERROR : i32 = 4; + /// public static final [ADVERTISE_FAILED_INTERNAL_ERROR](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_INTERNAL_ERROR) + pub const ADVERTISE_FAILED_INTERNAL_ERROR: i32 = 4; - /// public static final [ADVERTISE_FAILED_TOO_MANY_ADVERTISERS](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_TOO_MANY_ADVERTISERS) - pub const ADVERTISE_FAILED_TOO_MANY_ADVERTISERS : i32 = 2; + /// public static final [ADVERTISE_FAILED_TOO_MANY_ADVERTISERS](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_FAILED_TOO_MANY_ADVERTISERS) + pub const ADVERTISE_FAILED_TOO_MANY_ADVERTISERS: i32 = 2; - /// public static final [ADVERTISE_SUCCESS](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_SUCCESS) - pub const ADVERTISE_SUCCESS : i32 = 0; - } + /// public static final [ADVERTISE_SUCCESS](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetCallback.html#ADVERTISE_SUCCESS) + pub const ADVERTISE_SUCCESS: i32 = 0; } - ::java_spaghetti::class! { - /// public final class [AdvertisingSetParameters](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html) - public final class AdvertisingSetParameters ("android/bluetooth/le/AdvertisingSetParameters\0") extends super::super::super::java::lang::Object, implements super::super::os::Parcelable { + /// pub final class [AdvertisingSetParameters](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html) + #[repr(transparent)] + pub struct AdvertisingSetParameters(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for AdvertisingSetParameters {} - /// [isConnectable](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#isConnectable()) - pub fn isConnectable<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "isConnectable", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "isConnectable\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for AdvertisingSetParameters { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/AdvertisingSetParameters\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for AdvertisingSetParameters {} + unsafe impl ::java_spaghetti::AssignableTo for AdvertisingSetParameters {} + impl ::std::ops::Deref for AdvertisingSetParameters { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for AdvertisingSetParameters { + fn as_ref(&self) -> &super::super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::super::os::Parcelable) } + } + } + impl AdvertisingSetParameters { + /// [isConnectable](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#isConnectable()) + pub fn isConnectable<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "isConnectable", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "isConnectable\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isScannable](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#isScannable()) - pub fn isScannable<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "isScannable", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "isScannable\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isScannable](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#isScannable()) + pub fn isScannable<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "isScannable", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "isScannable\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isLegacy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#isLegacy()) - pub fn isLegacy<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "isLegacy", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "isLegacy\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isLegacy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#isLegacy()) + pub fn isLegacy<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "isLegacy", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "isLegacy\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isAnonymous](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#isAnonymous()) - pub fn isAnonymous<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "isAnonymous", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "isAnonymous\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isAnonymous](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#isAnonymous()) + pub fn isAnonymous<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "isAnonymous", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "isAnonymous\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [includeTxPower](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#includeTxPower()) - pub fn includeTxPower<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "includeTxPower", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "includeTxPower\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [includeTxPower](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#includeTxPower()) + pub fn includeTxPower<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "includeTxPower", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "includeTxPower\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getPrimaryPhy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#getPrimaryPhy()) - pub fn getPrimaryPhy<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "getPrimaryPhy", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "getPrimaryPhy\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getPrimaryPhy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#getPrimaryPhy()) + pub fn getPrimaryPhy<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "getPrimaryPhy", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "getPrimaryPhy\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getSecondaryPhy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#getSecondaryPhy()) - pub fn getSecondaryPhy<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "getSecondaryPhy", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "getSecondaryPhy\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getSecondaryPhy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#getSecondaryPhy()) + pub fn getSecondaryPhy<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "getSecondaryPhy", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "getSecondaryPhy\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getInterval](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#getInterval()) - pub fn getInterval<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "getInterval", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "getInterval\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getInterval](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#getInterval()) + pub fn getInterval<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "getInterval", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "getInterval\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#getTxPowerLevel()) - pub fn getTxPowerLevel<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "getTxPowerLevel", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "getTxPowerLevel\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#getTxPowerLevel()) + pub fn getTxPowerLevel<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "getTxPowerLevel", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "getTxPowerLevel\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/AdvertisingSetParameters", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [INTERVAL_HIGH](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_HIGH) - pub const INTERVAL_HIGH : i32 = 1600; + /// public static final [INTERVAL_HIGH](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_HIGH) + pub const INTERVAL_HIGH: i32 = 1600; - /// public static final [INTERVAL_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_LOW) - pub const INTERVAL_LOW : i32 = 160; + /// public static final [INTERVAL_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_LOW) + pub const INTERVAL_LOW: i32 = 160; - /// public static final [INTERVAL_MAX](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_MAX) - pub const INTERVAL_MAX : i32 = 16777215; + /// public static final [INTERVAL_MAX](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_MAX) + pub const INTERVAL_MAX: i32 = 16777215; - /// public static final [INTERVAL_MEDIUM](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_MEDIUM) - pub const INTERVAL_MEDIUM : i32 = 400; + /// public static final [INTERVAL_MEDIUM](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_MEDIUM) + pub const INTERVAL_MEDIUM: i32 = 400; - /// public static final [INTERVAL_MIN](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_MIN) - pub const INTERVAL_MIN : i32 = 160; + /// public static final [INTERVAL_MIN](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#INTERVAL_MIN) + pub const INTERVAL_MIN: i32 = 160; - /// public static final [TX_POWER_HIGH](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_HIGH) - pub const TX_POWER_HIGH : i32 = 1; + /// public static final [TX_POWER_HIGH](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_HIGH) + pub const TX_POWER_HIGH: i32 = 1; - /// public static final [TX_POWER_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_LOW) - pub const TX_POWER_LOW : i32 = -15; + /// public static final [TX_POWER_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_LOW) + pub const TX_POWER_LOW: i32 = -15; - /// public static final [TX_POWER_MAX](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_MAX) - pub const TX_POWER_MAX : i32 = 1; + /// public static final [TX_POWER_MAX](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_MAX) + pub const TX_POWER_MAX: i32 = 1; - /// public static final [TX_POWER_MEDIUM](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_MEDIUM) - pub const TX_POWER_MEDIUM : i32 = -7; + /// public static final [TX_POWER_MEDIUM](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_MEDIUM) + pub const TX_POWER_MEDIUM: i32 = -7; - /// public static final [TX_POWER_MIN](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_MIN) - pub const TX_POWER_MIN : i32 = -127; + /// public static final [TX_POWER_MIN](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_MIN) + pub const TX_POWER_MIN: i32 = -127; - /// public static final [TX_POWER_ULTRA_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_ULTRA_LOW) - pub const TX_POWER_ULTRA_LOW : i32 = -21; - } + /// public static final [TX_POWER_ULTRA_LOW](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.html#TX_POWER_ULTRA_LOW) + pub const TX_POWER_ULTRA_LOW: i32 = -21; } - ::java_spaghetti::class! { - /// public final class [AdvertisingSetParameters.Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html) - public final class AdvertisingSetParameters_Builder ("android/bluetooth/le/AdvertisingSetParameters$Builder\0") extends super::super::super::java::lang::Object { + /// pub final class [AdvertisingSetParameters.Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html) + #[repr(transparent)] + pub struct AdvertisingSetParameters_Builder(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for AdvertisingSetParameters_Builder {} - /// [Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#Builder()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for AdvertisingSetParameters_Builder { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/AdvertisingSetParameters$Builder\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo + for AdvertisingSetParameters_Builder + { + } + impl ::std::ops::Deref for AdvertisingSetParameters_Builder { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl AdvertisingSetParameters_Builder { + /// [Builder](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#Builder()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [setConnectable](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setConnectable(boolean)) - pub fn setConnectable<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setConnectable", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "setConnectable\0", "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setConnectable](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setConnectable(boolean)) + pub fn setConnectable<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setConnectable", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "setConnectable\0", + "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setScannable](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setScannable(boolean)) - pub fn setScannable<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setScannable", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "setScannable\0", "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setScannable](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setScannable(boolean)) + pub fn setScannable<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setScannable", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "setScannable\0", + "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setLegacyMode](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setLegacyMode(boolean)) - pub fn setLegacyMode<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setLegacyMode", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "setLegacyMode\0", "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setLegacyMode](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setLegacyMode(boolean)) + pub fn setLegacyMode<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setLegacyMode", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "setLegacyMode\0", + "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setAnonymous](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setAnonymous(boolean)) - pub fn setAnonymous<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setAnonymous", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "setAnonymous\0", "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setAnonymous](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setAnonymous(boolean)) + pub fn setAnonymous<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setAnonymous", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "setAnonymous\0", + "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setIncludeTxPower](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setIncludeTxPower(boolean)) - pub fn setIncludeTxPower<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setIncludeTxPower", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "setIncludeTxPower\0", "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setIncludeTxPower](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setIncludeTxPower(boolean)) + pub fn setIncludeTxPower<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setIncludeTxPower", .descriptor == "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "setIncludeTxPower\0", + "(Z)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setPrimaryPhy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setPrimaryPhy(int)) - pub fn setPrimaryPhy<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setPrimaryPhy", .descriptor == "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "setPrimaryPhy\0", "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setPrimaryPhy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setPrimaryPhy(int)) + pub fn setPrimaryPhy<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setPrimaryPhy", .descriptor == "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "setPrimaryPhy\0", + "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setSecondaryPhy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setSecondaryPhy(int)) - pub fn setSecondaryPhy<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setSecondaryPhy", .descriptor == "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "setSecondaryPhy\0", "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setSecondaryPhy](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setSecondaryPhy(int)) + pub fn setSecondaryPhy<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setSecondaryPhy", .descriptor == "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "setSecondaryPhy\0", + "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setInterval](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setInterval(int)) - pub fn setInterval<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setInterval", .descriptor == "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "setInterval\0", "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setInterval](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setInterval(int)) + pub fn setInterval<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setInterval", .descriptor == "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "setInterval\0", + "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setTxPowerLevel(int)) - pub fn setTxPowerLevel<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setTxPowerLevel", .descriptor == "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "setTxPowerLevel\0", "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#setTxPowerLevel(int)) + pub fn setTxPowerLevel<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "setTxPowerLevel", .descriptor == "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "setTxPowerLevel\0", + "(I)Landroid/bluetooth/le/AdvertisingSetParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [build](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#build()) - pub fn build<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/AdvertisingSetParameters;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/AdvertisingSetParameters$Builder\0", "build\0", "()Landroid/bluetooth/le/AdvertisingSetParameters;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [build](https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters.Builder.html#build()) + pub fn build<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, AdvertisingSetParameters>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/AdvertisingSetParameters$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/AdvertisingSetParameters;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/AdvertisingSetParameters$Builder\0", + "build\0", + "()Landroid/bluetooth/le/AdvertisingSetParameters;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [BluetoothLeAdvertiser](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html) - public final class BluetoothLeAdvertiser ("android/bluetooth/le/BluetoothLeAdvertiser\0") extends super::super::super::java::lang::Object { + /// pub final class [BluetoothLeAdvertiser](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html) + #[repr(transparent)] + pub struct BluetoothLeAdvertiser(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothLeAdvertiser {} - /// [startAdvertising](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#startAdvertising(android.bluetooth.le.AdvertiseSettings,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseCallback)) - pub fn startAdvertising_AdvertiseSettings_AdvertiseData_AdvertiseCallback<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseSettings>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "startAdvertising", .descriptor == "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "startAdvertising\0", "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothLeAdvertiser { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/BluetoothLeAdvertiser\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothLeAdvertiser {} + impl ::std::ops::Deref for BluetoothLeAdvertiser { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothLeAdvertiser { + /// [startAdvertising](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#startAdvertising(android.bluetooth.le.AdvertiseSettings,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseCallback)) + pub fn startAdvertising_AdvertiseSettings_AdvertiseData_AdvertiseCallback<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "startAdvertising", .descriptor == "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue(), arg2.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "startAdvertising\0", "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [startAdvertising](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#startAdvertising(android.bluetooth.le.AdvertiseSettings,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseCallback)) - pub fn startAdvertising_AdvertiseSettings_AdvertiseData_AdvertiseData_AdvertiseCallback<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseSettings>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "startAdvertising", .descriptor == "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "startAdvertising\0", "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [startAdvertising](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#startAdvertising(android.bluetooth.le.AdvertiseSettings,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseCallback)) + pub fn startAdvertising_AdvertiseSettings_AdvertiseData_AdvertiseData_AdvertiseCallback<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "startAdvertising", .descriptor == "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "startAdvertising\0", "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [stopAdvertising](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#stopAdvertising(android.bluetooth.le.AdvertiseCallback)) - pub fn stopAdvertising<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "stopAdvertising", .descriptor == "(Landroid/bluetooth/le/AdvertiseCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "stopAdvertising\0", "(Landroid/bluetooth/le/AdvertiseCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [stopAdvertising](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#stopAdvertising(android.bluetooth.le.AdvertiseCallback)) + pub fn stopAdvertising<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "stopAdvertising", .descriptor == "(Landroid/bluetooth/le/AdvertiseCallback;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/BluetoothLeAdvertiser\0", + "stopAdvertising\0", + "(Landroid/bluetooth/le/AdvertiseCallback;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [startAdvertisingSet](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.PeriodicAdvertisingParameters,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertisingSetCallback)) - pub fn startAdvertisingSet_AdvertisingSetParameters_AdvertiseData_AdvertiseData_PeriodicAdvertisingParameters_AdvertiseData_AdvertisingSetCallback<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSetParameters>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env PeriodicAdvertisingParameters>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSetCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "startAdvertisingSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertisingSetCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "startAdvertisingSet\0", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertisingSetCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [startAdvertisingSet](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.PeriodicAdvertisingParameters,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertisingSetCallback)) + pub fn startAdvertisingSet_AdvertisingSetParameters_AdvertiseData_AdvertiseData_PeriodicAdvertisingParameters_AdvertiseData_AdvertisingSetCallback< + 'env, + >( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "startAdvertisingSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertisingSetCallback;)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "startAdvertisingSet\0", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertisingSetCallback;)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [startAdvertisingSet](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.PeriodicAdvertisingParameters,%20android.bluetooth.le.AdvertiseData,%20int,%20int,%20android.bluetooth.le.AdvertisingSetCallback)) - pub fn startAdvertisingSet_AdvertisingSetParameters_AdvertiseData_AdvertiseData_PeriodicAdvertisingParameters_AdvertiseData_int_int_AdvertisingSetCallback<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSetParameters>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env PeriodicAdvertisingParameters>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env AdvertiseData>>, arg5: i32, arg6: i32, arg7: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSetCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "startAdvertisingSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/AdvertisingSetCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5), ::java_spaghetti::AsJValue::as_jvalue(&arg6), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "startAdvertisingSet\0", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/AdvertisingSetCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [startAdvertisingSet](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.AdvertiseData,%20android.bluetooth.le.PeriodicAdvertisingParameters,%20android.bluetooth.le.AdvertiseData,%20int,%20int,%20android.bluetooth.le.AdvertisingSetCallback)) + pub fn startAdvertisingSet_AdvertisingSetParameters_AdvertiseData_AdvertiseData_PeriodicAdvertisingParameters_AdvertiseData_int_int_AdvertisingSetCallback< + 'env, + >( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: i32, + arg6: i32, + arg7: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "startAdvertisingSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/AdvertisingSetCallback;)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg5), + ::java_spaghetti::AsJValue::as_jvalue(&arg6), + arg7.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "startAdvertisingSet\0", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/AdvertisingSetCallback;)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [stopAdvertisingSet](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#stopAdvertisingSet(android.bluetooth.le.AdvertisingSetCallback)) - pub fn stopAdvertisingSet<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env AdvertisingSetCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "stopAdvertisingSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSetCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeAdvertiser\0", "stopAdvertisingSet\0", "(Landroid/bluetooth/le/AdvertisingSetCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [stopAdvertisingSet](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html#stopAdvertisingSet(android.bluetooth.le.AdvertisingSetCallback)) + pub fn stopAdvertisingSet<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeAdvertiser", java.flags == PUBLIC, .name == "stopAdvertisingSet", .descriptor == "(Landroid/bluetooth/le/AdvertisingSetCallback;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/BluetoothLeAdvertiser\0", + "stopAdvertisingSet\0", + "(Landroid/bluetooth/le/AdvertisingSetCallback;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [BluetoothLeScanner](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html) - public final class BluetoothLeScanner ("android/bluetooth/le/BluetoothLeScanner\0") extends super::super::super::java::lang::Object { + /// pub final class [BluetoothLeScanner](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html) + #[repr(transparent)] + pub struct BluetoothLeScanner(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothLeScanner {} - /// [startScan](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#startScan(android.bluetooth.le.ScanCallback)) - pub fn startScan_ScanCallback<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ScanCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeScanner", java.flags == PUBLIC, .name == "startScan", .descriptor == "(Landroid/bluetooth/le/ScanCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeScanner\0", "startScan\0", "(Landroid/bluetooth/le/ScanCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothLeScanner { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/BluetoothLeScanner\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothLeScanner {} + impl ::std::ops::Deref for BluetoothLeScanner { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothLeScanner { + /// [startScan](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#startScan(android.bluetooth.le.ScanCallback)) + pub fn startScan_ScanCallback<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeScanner", java.flags == PUBLIC, .name == "startScan", .descriptor == "(Landroid/bluetooth/le/ScanCallback;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/BluetoothLeScanner\0", + "startScan\0", + "(Landroid/bluetooth/le/ScanCallback;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [startScan](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#startScan(java.util.List,%20android.bluetooth.le.ScanSettings,%20android.bluetooth.le.ScanCallback)) - pub fn startScan_List_ScanSettings_ScanCallback<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::util::List>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env ScanSettings>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env ScanCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeScanner", java.flags == PUBLIC, .name == "startScan", .descriptor == "(Ljava/util/List;Landroid/bluetooth/le/ScanSettings;Landroid/bluetooth/le/ScanCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeScanner\0", "startScan\0", "(Ljava/util/List;Landroid/bluetooth/le/ScanSettings;Landroid/bluetooth/le/ScanCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [startScan](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#startScan(java.util.List,%20android.bluetooth.le.ScanSettings,%20android.bluetooth.le.ScanCallback)) + pub fn startScan_List_ScanSettings_ScanCallback<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeScanner", java.flags == PUBLIC, .name == "startScan", .descriptor == "(Ljava/util/List;Landroid/bluetooth/le/ScanSettings;Landroid/bluetooth/le/ScanCallback;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue(), arg2.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeScanner\0", "startScan\0", "(Ljava/util/List;Landroid/bluetooth/le/ScanSettings;Landroid/bluetooth/le/ScanCallback;)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [stopScan](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#stopScan(android.bluetooth.le.ScanCallback)) - pub fn stopScan_ScanCallback<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ScanCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeScanner", java.flags == PUBLIC, .name == "stopScan", .descriptor == "(Landroid/bluetooth/le/ScanCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeScanner\0", "stopScan\0", "(Landroid/bluetooth/le/ScanCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [stopScan](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#stopScan(android.bluetooth.le.ScanCallback)) + pub fn stopScan_ScanCallback<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeScanner", java.flags == PUBLIC, .name == "stopScan", .descriptor == "(Landroid/bluetooth/le/ScanCallback;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/BluetoothLeScanner\0", + "stopScan\0", + "(Landroid/bluetooth/le/ScanCallback;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [flushPendingScanResults](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#flushPendingScanResults(android.bluetooth.le.ScanCallback)) - pub fn flushPendingScanResults<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ScanCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/BluetoothLeScanner", java.flags == PUBLIC, .name == "flushPendingScanResults", .descriptor == "(Landroid/bluetooth/le/ScanCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/BluetoothLeScanner\0", "flushPendingScanResults\0", "(Landroid/bluetooth/le/ScanCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [flushPendingScanResults](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#flushPendingScanResults(android.bluetooth.le.ScanCallback)) + pub fn flushPendingScanResults<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/BluetoothLeScanner", java.flags == PUBLIC, .name == "flushPendingScanResults", .descriptor == "(Landroid/bluetooth/le/ScanCallback;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/BluetoothLeScanner\0", + "flushPendingScanResults\0", + "(Landroid/bluetooth/le/ScanCallback;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [EXTRA_CALLBACK_TYPE](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#EXTRA_CALLBACK_TYPE) - pub const EXTRA_CALLBACK_TYPE : &'static str = "android.bluetooth.le.extra.CALLBACK_TYPE"; + /// public static final [EXTRA_CALLBACK_TYPE](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#EXTRA_CALLBACK_TYPE) + pub const EXTRA_CALLBACK_TYPE: &'static str = "android.bluetooth.le.extra.CALLBACK_TYPE"; - /// public static final [EXTRA_ERROR_CODE](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#EXTRA_ERROR_CODE) - pub const EXTRA_ERROR_CODE : &'static str = "android.bluetooth.le.extra.ERROR_CODE"; + /// public static final [EXTRA_ERROR_CODE](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#EXTRA_ERROR_CODE) + pub const EXTRA_ERROR_CODE: &'static str = "android.bluetooth.le.extra.ERROR_CODE"; - /// public static final [EXTRA_LIST_SCAN_RESULT](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#EXTRA_LIST_SCAN_RESULT) - pub const EXTRA_LIST_SCAN_RESULT : &'static str = "android.bluetooth.le.extra.LIST_SCAN_RESULT"; - } + /// public static final [EXTRA_LIST_SCAN_RESULT](https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#EXTRA_LIST_SCAN_RESULT) + pub const EXTRA_LIST_SCAN_RESULT: &'static str = "android.bluetooth.le.extra.LIST_SCAN_RESULT"; } - ::java_spaghetti::class! { - /// public final class [PeriodicAdvertisingParameters](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.html) - public final class PeriodicAdvertisingParameters ("android/bluetooth/le/PeriodicAdvertisingParameters\0") extends super::super::super::java::lang::Object, implements super::super::os::Parcelable { + /// pub final class [PeriodicAdvertisingParameters](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.html) + #[repr(transparent)] + pub struct PeriodicAdvertisingParameters(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for PeriodicAdvertisingParameters {} - /// [getIncludeTxPower](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.html#getIncludeTxPower()) - pub fn getIncludeTxPower<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters", java.flags == PUBLIC, .name == "getIncludeTxPower", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/PeriodicAdvertisingParameters\0", "getIncludeTxPower\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for PeriodicAdvertisingParameters { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/PeriodicAdvertisingParameters\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for PeriodicAdvertisingParameters {} + unsafe impl ::java_spaghetti::AssignableTo for PeriodicAdvertisingParameters {} + impl ::std::ops::Deref for PeriodicAdvertisingParameters { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for PeriodicAdvertisingParameters { + fn as_ref(&self) -> &super::super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::super::os::Parcelable) } + } + } + impl PeriodicAdvertisingParameters { + /// [getIncludeTxPower](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.html#getIncludeTxPower()) + pub fn getIncludeTxPower<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters", java.flags == PUBLIC, .name == "getIncludeTxPower", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/PeriodicAdvertisingParameters\0", + "getIncludeTxPower\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getInterval](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.html#getInterval()) - pub fn getInterval<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters", java.flags == PUBLIC, .name == "getInterval", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/PeriodicAdvertisingParameters\0", "getInterval\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getInterval](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.html#getInterval()) + pub fn getInterval<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters", java.flags == PUBLIC, .name == "getInterval", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/PeriodicAdvertisingParameters\0", + "getInterval\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/PeriodicAdvertisingParameters\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/PeriodicAdvertisingParameters\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [PeriodicAdvertisingParameters.Builder](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html) - public final class PeriodicAdvertisingParameters_Builder ("android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0") extends super::super::super::java::lang::Object { + /// pub final class [PeriodicAdvertisingParameters.Builder](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html) + #[repr(transparent)] + pub struct PeriodicAdvertisingParameters_Builder(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for PeriodicAdvertisingParameters_Builder {} - /// [Builder](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html#Builder()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } - } - - /// [setIncludeTxPower](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html#setIncludeTxPower(boolean)) - pub fn setIncludeTxPower<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, PeriodicAdvertisingParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters$Builder", java.flags == PUBLIC, .name == "setIncludeTxPower", .descriptor == "(Z)Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0", "setIncludeTxPower\0", "(Z)Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for PeriodicAdvertisingParameters_Builder { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo + for PeriodicAdvertisingParameters_Builder + { + } + impl ::std::ops::Deref for PeriodicAdvertisingParameters_Builder { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl PeriodicAdvertisingParameters_Builder { + /// [Builder](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html#Builder()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [setInterval](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html#setInterval(int)) - pub fn setInterval<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, PeriodicAdvertisingParameters_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters$Builder", java.flags == PUBLIC, .name == "setInterval", .descriptor == "(I)Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0", "setInterval\0", "(I)Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setIncludeTxPower](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html#setIncludeTxPower(boolean)) + pub fn setIncludeTxPower<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, PeriodicAdvertisingParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters$Builder", java.flags == PUBLIC, .name == "setIncludeTxPower", .descriptor == "(Z)Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0", + "setIncludeTxPower\0", + "(Z)Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [build](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html#build()) - pub fn build<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, PeriodicAdvertisingParameters>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/PeriodicAdvertisingParameters;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0", "build\0", "()Landroid/bluetooth/le/PeriodicAdvertisingParameters;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setInterval](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html#setInterval(int)) + pub fn setInterval<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, PeriodicAdvertisingParameters_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters$Builder", java.flags == PUBLIC, .name == "setInterval", .descriptor == "(I)Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0", + "setInterval\0", + "(I)Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } + + /// [build](https://developer.android.com/reference/android/bluetooth/le/PeriodicAdvertisingParameters.Builder.html#build()) + pub fn build<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, PeriodicAdvertisingParameters>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/PeriodicAdvertisingParameters$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/PeriodicAdvertisingParameters;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/PeriodicAdvertisingParameters$Builder\0", + "build\0", + "()Landroid/bluetooth/le/PeriodicAdvertisingParameters;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public class [ScanCallback](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html) - public class ScanCallback ("android/bluetooth/le/ScanCallback\0") extends super::super::super::java::lang::Object { + /// pub class [ScanCallback](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html) + #[repr(transparent)] + pub struct ScanCallback(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for ScanCallback {} - /// [ScanCallback](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#ScanCallback()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanCallback\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for ScanCallback { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/ScanCallback\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for ScanCallback {} + impl ::std::ops::Deref for ScanCallback { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ScanCallback { + /// [ScanCallback](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#ScanCallback()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/le/ScanCallback\0", "\0", "()V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [onScanResult](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#onScanResult(int,%20android.bluetooth.le.ScanResult)) - pub fn onScanResult<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env ScanResult>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanCallback", java.flags == PUBLIC, .name == "onScanResult", .descriptor == "(ILandroid/bluetooth/le/ScanResult;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanCallback\0", "onScanResult\0", "(ILandroid/bluetooth/le/ScanResult;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onScanResult](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#onScanResult(int,%20android.bluetooth.le.ScanResult)) + pub fn onScanResult<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/ScanCallback", java.flags == PUBLIC, .name == "onScanResult", .descriptor == "(ILandroid/bluetooth/le/ScanResult;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanCallback\0", + "onScanResult\0", + "(ILandroid/bluetooth/le/ScanResult;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onBatchScanResults](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#onBatchScanResults(java.util.List)) - pub fn onBatchScanResults<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::util::List>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanCallback", java.flags == PUBLIC, .name == "onBatchScanResults", .descriptor == "(Ljava/util/List;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanCallback\0", "onBatchScanResults\0", "(Ljava/util/List;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onBatchScanResults](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#onBatchScanResults(java.util.List)) + pub fn onBatchScanResults<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/ScanCallback", java.flags == PUBLIC, .name == "onBatchScanResults", .descriptor == "(Ljava/util/List;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanCallback\0", + "onBatchScanResults\0", + "(Ljava/util/List;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onScanFailed](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#onScanFailed(int)) - pub fn onScanFailed<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanCallback", java.flags == PUBLIC, .name == "onScanFailed", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanCallback\0", "onScanFailed\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onScanFailed](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#onScanFailed(int)) + pub fn onScanFailed<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/le/ScanCallback", java.flags == PUBLIC, .name == "onScanFailed", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanCallback\0", + "onScanFailed\0", + "(I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [SCAN_FAILED_ALREADY_STARTED](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_ALREADY_STARTED) - pub const SCAN_FAILED_ALREADY_STARTED : i32 = 1; + /// public static final [SCAN_FAILED_ALREADY_STARTED](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_ALREADY_STARTED) + pub const SCAN_FAILED_ALREADY_STARTED: i32 = 1; - /// public static final [SCAN_FAILED_APPLICATION_REGISTRATION_FAILED](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_APPLICATION_REGISTRATION_FAILED) - pub const SCAN_FAILED_APPLICATION_REGISTRATION_FAILED : i32 = 2; + /// public static final [SCAN_FAILED_APPLICATION_REGISTRATION_FAILED](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_APPLICATION_REGISTRATION_FAILED) + pub const SCAN_FAILED_APPLICATION_REGISTRATION_FAILED: i32 = 2; - /// public static final [SCAN_FAILED_FEATURE_UNSUPPORTED](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_FEATURE_UNSUPPORTED) - pub const SCAN_FAILED_FEATURE_UNSUPPORTED : i32 = 4; + /// public static final [SCAN_FAILED_FEATURE_UNSUPPORTED](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_FEATURE_UNSUPPORTED) + pub const SCAN_FAILED_FEATURE_UNSUPPORTED: i32 = 4; - /// public static final [SCAN_FAILED_INTERNAL_ERROR](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_INTERNAL_ERROR) - pub const SCAN_FAILED_INTERNAL_ERROR : i32 = 3; + /// public static final [SCAN_FAILED_INTERNAL_ERROR](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_INTERNAL_ERROR) + pub const SCAN_FAILED_INTERNAL_ERROR: i32 = 3; - /// public static final [SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES) - pub const SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES : i32 = 5; + /// public static final [SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES) + pub const SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES: i32 = 5; - /// public static final [SCAN_FAILED_SCANNING_TOO_FREQUENTLY](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_SCANNING_TOO_FREQUENTLY) - pub const SCAN_FAILED_SCANNING_TOO_FREQUENTLY : i32 = 6; - } + /// public static final [SCAN_FAILED_SCANNING_TOO_FREQUENTLY](https://developer.android.com/reference/android/bluetooth/le/ScanCallback.html#SCAN_FAILED_SCANNING_TOO_FREQUENTLY) + pub const SCAN_FAILED_SCANNING_TOO_FREQUENTLY: i32 = 6; } - ::java_spaghetti::class! { - /// public final class [ScanFilter](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html) - public final class ScanFilter ("android/bluetooth/le/ScanFilter\0") extends super::super::super::java::lang::Object, implements super::super::os::Parcelable { + /// pub final class [ScanFilter](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html) + #[repr(transparent)] + pub struct ScanFilter(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for ScanFilter {} - /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for ScanFilter { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/ScanFilter\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for ScanFilter {} + unsafe impl ::java_spaghetti::AssignableTo for ScanFilter {} + impl ::std::ops::Deref for ScanFilter { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for ScanFilter { + fn as_ref(&self) -> &super::super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::super::os::Parcelable) } + } + } + impl ScanFilter { + /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDeviceName](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getDeviceName()) - pub fn getDeviceName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getDeviceName", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getDeviceName\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDeviceName](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getDeviceName()) + pub fn getDeviceName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getDeviceName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getDeviceName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceUuid()) - pub fn getServiceUuid<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceUuid", .descriptor == "()Landroid/os/ParcelUuid;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getServiceUuid\0", "()Landroid/os/ParcelUuid;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceUuid()) + pub fn getServiceUuid<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceUuid", .descriptor == "()Landroid/os/ParcelUuid;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getServiceUuid\0", + "()Landroid/os/ParcelUuid;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceUuidMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceUuidMask()) - pub fn getServiceUuidMask<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceUuidMask", .descriptor == "()Landroid/os/ParcelUuid;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getServiceUuidMask\0", "()Landroid/os/ParcelUuid;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceUuidMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceUuidMask()) + pub fn getServiceUuidMask<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceUuidMask", .descriptor == "()Landroid/os/ParcelUuid;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getServiceUuidMask\0", + "()Landroid/os/ParcelUuid;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceSolicitationUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceSolicitationUuid()) - pub fn getServiceSolicitationUuid<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceSolicitationUuid", .descriptor == "()Landroid/os/ParcelUuid;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getServiceSolicitationUuid\0", "()Landroid/os/ParcelUuid;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceSolicitationUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceSolicitationUuid()) + pub fn getServiceSolicitationUuid<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceSolicitationUuid", .descriptor == "()Landroid/os/ParcelUuid;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getServiceSolicitationUuid\0", + "()Landroid/os/ParcelUuid;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceSolicitationUuidMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceSolicitationUuidMask()) - pub fn getServiceSolicitationUuidMask<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceSolicitationUuidMask", .descriptor == "()Landroid/os/ParcelUuid;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getServiceSolicitationUuidMask\0", "()Landroid/os/ParcelUuid;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceSolicitationUuidMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceSolicitationUuidMask()) + pub fn getServiceSolicitationUuidMask<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceSolicitationUuidMask", .descriptor == "()Landroid/os/ParcelUuid;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getServiceSolicitationUuidMask\0", + "()Landroid/os/ParcelUuid;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDeviceAddress](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getDeviceAddress()) - pub fn getDeviceAddress<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getDeviceAddress", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getDeviceAddress\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDeviceAddress](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getDeviceAddress()) + pub fn getDeviceAddress<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getDeviceAddress", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getDeviceAddress\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceData()) - pub fn getServiceData<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceData", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getServiceData\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceData()) + pub fn getServiceData<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceData", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getServiceData\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceDataMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceDataMask()) - pub fn getServiceDataMask<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceDataMask", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getServiceDataMask\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceDataMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceDataMask()) + pub fn getServiceDataMask<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceDataMask", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getServiceDataMask\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceDataUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceDataUuid()) - pub fn getServiceDataUuid<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceDataUuid", .descriptor == "()Landroid/os/ParcelUuid;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getServiceDataUuid\0", "()Landroid/os/ParcelUuid;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceDataUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getServiceDataUuid()) + pub fn getServiceDataUuid<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::os::ParcelUuid>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getServiceDataUuid", .descriptor == "()Landroid/os/ParcelUuid;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getServiceDataUuid\0", + "()Landroid/os/ParcelUuid;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getManufacturerId](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getManufacturerId()) - pub fn getManufacturerId<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getManufacturerId", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getManufacturerId\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getManufacturerId](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getManufacturerId()) + pub fn getManufacturerId<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getManufacturerId", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getManufacturerId\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getManufacturerData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getManufacturerData()) - pub fn getManufacturerData<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getManufacturerData", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getManufacturerData\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getManufacturerData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getManufacturerData()) + pub fn getManufacturerData<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getManufacturerData", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getManufacturerData\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getManufacturerDataMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getManufacturerDataMask()) - pub fn getManufacturerDataMask<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getManufacturerDataMask", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getManufacturerDataMask\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getManufacturerDataMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getManufacturerDataMask()) + pub fn getManufacturerDataMask<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getManufacturerDataMask", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getManufacturerDataMask\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getAdvertisingDataType](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getAdvertisingDataType()) - pub fn getAdvertisingDataType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getAdvertisingDataType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getAdvertisingDataType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getAdvertisingDataType](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getAdvertisingDataType()) + pub fn getAdvertisingDataType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getAdvertisingDataType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getAdvertisingDataType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getAdvertisingData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getAdvertisingData()) - pub fn getAdvertisingData<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getAdvertisingData", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getAdvertisingData\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getAdvertisingData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getAdvertisingData()) + pub fn getAdvertisingData<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getAdvertisingData", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getAdvertisingData\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getAdvertisingDataMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getAdvertisingDataMask()) - pub fn getAdvertisingDataMask<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getAdvertisingDataMask", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "getAdvertisingDataMask\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getAdvertisingDataMask](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#getAdvertisingDataMask()) + pub fn getAdvertisingDataMask<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "getAdvertisingDataMask", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "getAdvertisingDataMask\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [matches](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#matches(android.bluetooth.le.ScanResult)) - pub fn matches<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ScanResult>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "matches", .descriptor == "(Landroid/bluetooth/le/ScanResult;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "matches\0", "(Landroid/bluetooth/le/ScanResult;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [matches](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#matches(android.bluetooth.le.ScanResult)) + pub fn matches<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "matches", .descriptor == "(Landroid/bluetooth/le/ScanResult;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "matches\0", + "(Landroid/bluetooth/le/ScanResult;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [ScanFilter.Builder](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html) - public final class ScanFilter_Builder ("android/bluetooth/le/ScanFilter$Builder\0") extends super::super::super::java::lang::Object { + /// pub final class [ScanFilter.Builder](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html) + #[repr(transparent)] + pub struct ScanFilter_Builder(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for ScanFilter_Builder {} - /// [Builder](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#Builder()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for ScanFilter_Builder { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/ScanFilter$Builder\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for ScanFilter_Builder {} + impl ::std::ops::Deref for ScanFilter_Builder { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ScanFilter_Builder { + /// [Builder](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#Builder()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [setDeviceName](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setDeviceName(java.lang.String)) - pub fn setDeviceName<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::lang::String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setDeviceName", .descriptor == "(Ljava/lang/String;)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setDeviceName\0", "(Ljava/lang/String;)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setDeviceName](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setDeviceName(java.lang.String)) + pub fn setDeviceName<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setDeviceName", .descriptor == "(Ljava/lang/String;)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setDeviceName\0", + "(Ljava/lang/String;)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setDeviceAddress](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setDeviceAddress(java.lang.String)) - pub fn setDeviceAddress<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::lang::String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setDeviceAddress", .descriptor == "(Ljava/lang/String;)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setDeviceAddress\0", "(Ljava/lang/String;)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setDeviceAddress](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setDeviceAddress(java.lang.String)) + pub fn setDeviceAddress<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setDeviceAddress", .descriptor == "(Ljava/lang/String;)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setDeviceAddress\0", + "(Ljava/lang/String;)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setServiceUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceUuid(android.os.ParcelUuid)) - pub fn setServiceUuid_ParcelUuid<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceUuid", .descriptor == "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setServiceUuid\0", "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setServiceUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceUuid(android.os.ParcelUuid)) + pub fn setServiceUuid_ParcelUuid<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceUuid", .descriptor == "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setServiceUuid\0", + "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setServiceUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceUuid(android.os.ParcelUuid,%20android.os.ParcelUuid)) - pub fn setServiceUuid_ParcelUuid_ParcelUuid<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceUuid", .descriptor == "(Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setServiceUuid\0", "(Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setServiceUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceUuid(android.os.ParcelUuid,%20android.os.ParcelUuid)) + pub fn setServiceUuid_ParcelUuid_ParcelUuid<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceUuid", .descriptor == "(Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setServiceUuid\0", "(Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setServiceSolicitationUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceSolicitationUuid(android.os.ParcelUuid)) - pub fn setServiceSolicitationUuid_ParcelUuid<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceSolicitationUuid", .descriptor == "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setServiceSolicitationUuid\0", "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setServiceSolicitationUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceSolicitationUuid(android.os.ParcelUuid)) + pub fn setServiceSolicitationUuid_ParcelUuid<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceSolicitationUuid", .descriptor == "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setServiceSolicitationUuid\0", + "(Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setServiceSolicitationUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceSolicitationUuid(android.os.ParcelUuid,%20android.os.ParcelUuid)) - pub fn setServiceSolicitationUuid_ParcelUuid_ParcelUuid<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceSolicitationUuid", .descriptor == "(Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setServiceSolicitationUuid\0", "(Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setServiceSolicitationUuid](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceSolicitationUuid(android.os.ParcelUuid,%20android.os.ParcelUuid)) + pub fn setServiceSolicitationUuid_ParcelUuid_ParcelUuid<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceSolicitationUuid", .descriptor == "(Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setServiceSolicitationUuid\0", "(Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;)Landroid/bluetooth/le/ScanFilter$Builder;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceData(android.os.ParcelUuid,%20byte%5B%5D)) - pub fn setServiceData_ParcelUuid_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceData", .descriptor == "(Landroid/os/ParcelUuid;[B)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setServiceData\0", "(Landroid/os/ParcelUuid;[B)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceData(android.os.ParcelUuid,%20byte%5B%5D)) + pub fn setServiceData_ParcelUuid_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceData", .descriptor == "(Landroid/os/ParcelUuid;[B)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setServiceData\0", + "(Landroid/os/ParcelUuid;[B)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceData(android.os.ParcelUuid,%20byte%5B%5D,%20byte%5B%5D)) - pub fn setServiceData_ParcelUuid_byte_array_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceData", .descriptor == "(Landroid/os/ParcelUuid;[B[B)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setServiceData\0", "(Landroid/os/ParcelUuid;[B[B)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setServiceData(android.os.ParcelUuid,%20byte%5B%5D,%20byte%5B%5D)) + pub fn setServiceData_ParcelUuid_byte_array_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setServiceData", .descriptor == "(Landroid/os/ParcelUuid;[B[B)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue(), arg2.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setServiceData\0", + "(Landroid/os/ParcelUuid;[B[B)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setManufacturerData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setManufacturerData(int,%20byte%5B%5D)) - pub fn setManufacturerData_int_byte_array<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setManufacturerData", .descriptor == "(I[B)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setManufacturerData\0", "(I[B)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setManufacturerData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setManufacturerData(int,%20byte%5B%5D)) + pub fn setManufacturerData_int_byte_array<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setManufacturerData", .descriptor == "(I[B)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setManufacturerData\0", + "(I[B)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setManufacturerData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setManufacturerData(int,%20byte%5B%5D,%20byte%5B%5D)) - pub fn setManufacturerData_int_byte_array_byte_array<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setManufacturerData", .descriptor == "(I[B[B)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setManufacturerData\0", "(I[B[B)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setManufacturerData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setManufacturerData(int,%20byte%5B%5D,%20byte%5B%5D)) + pub fn setManufacturerData_int_byte_array_byte_array<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setManufacturerData", .descriptor == "(I[B[B)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setManufacturerData\0", + "(I[B[B)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setAdvertisingDataTypeWithData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setAdvertisingDataTypeWithData(int,%20byte%5B%5D,%20byte%5B%5D)) - pub fn setAdvertisingDataTypeWithData<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setAdvertisingDataTypeWithData", .descriptor == "(I[B[B)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setAdvertisingDataTypeWithData\0", "(I[B[B)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setAdvertisingDataTypeWithData](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setAdvertisingDataTypeWithData(int,%20byte%5B%5D,%20byte%5B%5D)) + pub fn setAdvertisingDataTypeWithData<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setAdvertisingDataTypeWithData", .descriptor == "(I[B[B)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setAdvertisingDataTypeWithData\0", + "(I[B[B)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setAdvertisingDataType](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setAdvertisingDataType(int)) - pub fn setAdvertisingDataType<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setAdvertisingDataType", .descriptor == "(I)Landroid/bluetooth/le/ScanFilter$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "setAdvertisingDataType\0", "(I)Landroid/bluetooth/le/ScanFilter$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setAdvertisingDataType](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#setAdvertisingDataType(int)) + pub fn setAdvertisingDataType<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "setAdvertisingDataType", .descriptor == "(I)Landroid/bluetooth/le/ScanFilter$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "setAdvertisingDataType\0", + "(I)Landroid/bluetooth/le/ScanFilter$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [build](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#build()) - pub fn build<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanFilter>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/ScanFilter;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanFilter$Builder\0", "build\0", "()Landroid/bluetooth/le/ScanFilter;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [build](https://developer.android.com/reference/android/bluetooth/le/ScanFilter.Builder.html#build()) + pub fn build<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanFilter>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanFilter$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/ScanFilter;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanFilter$Builder\0", + "build\0", + "()Landroid/bluetooth/le/ScanFilter;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [ScanRecord](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html) - public final class ScanRecord ("android/bluetooth/le/ScanRecord\0") extends super::super::super::java::lang::Object { + /// pub final class [ScanRecord](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html) + #[repr(transparent)] + pub struct ScanRecord(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for ScanRecord {} - /// [getAdvertiseFlags](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getAdvertiseFlags()) - pub fn getAdvertiseFlags<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getAdvertiseFlags", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getAdvertiseFlags\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for ScanRecord { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/ScanRecord\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for ScanRecord {} + impl ::std::ops::Deref for ScanRecord { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ScanRecord { + /// [getAdvertiseFlags](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getAdvertiseFlags()) + pub fn getAdvertiseFlags<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getAdvertiseFlags", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getAdvertiseFlags\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceUuids](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getServiceUuids()) - pub fn getServiceUuids<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getServiceUuids", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getServiceUuids\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceUuids](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getServiceUuids()) + pub fn getServiceUuids<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getServiceUuids", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getServiceUuids\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceSolicitationUuids](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getServiceSolicitationUuids()) - pub fn getServiceSolicitationUuids<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getServiceSolicitationUuids", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getServiceSolicitationUuids\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceSolicitationUuids](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getServiceSolicitationUuids()) + pub fn getServiceSolicitationUuids<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getServiceSolicitationUuids", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getServiceSolicitationUuids\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getManufacturerSpecificData](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getManufacturerSpecificData()) - pub fn getManufacturerSpecificData<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::util::SparseArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getManufacturerSpecificData", .descriptor == "()Landroid/util/SparseArray;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getManufacturerSpecificData\0", "()Landroid/util/SparseArray;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getManufacturerSpecificData](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getManufacturerSpecificData()) + pub fn getManufacturerSpecificData<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::util::SparseArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getManufacturerSpecificData", .descriptor == "()Landroid/util/SparseArray;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getManufacturerSpecificData\0", + "()Landroid/util/SparseArray;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getManufacturerSpecificData](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getManufacturerSpecificData(int)) - pub fn getManufacturerSpecificData_int<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getManufacturerSpecificData", .descriptor == "(I)[B" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getManufacturerSpecificData\0", "(I)[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getManufacturerSpecificData](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getManufacturerSpecificData(int)) + pub fn getManufacturerSpecificData_int<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getManufacturerSpecificData", .descriptor == "(I)[B" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getManufacturerSpecificData\0", + "(I)[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getServiceData()) - pub fn getServiceData<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::Map>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getServiceData", .descriptor == "()Ljava/util/Map;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getServiceData\0", "()Ljava/util/Map;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getServiceData()) + pub fn getServiceData<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::Map>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getServiceData", .descriptor == "()Ljava/util/Map;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getServiceData\0", + "()Ljava/util/Map;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getServiceData(android.os.ParcelUuid)) - pub fn getServiceData_ParcelUuid<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::os::ParcelUuid>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getServiceData", .descriptor == "(Landroid/os/ParcelUuid;)[B" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getServiceData\0", "(Landroid/os/ParcelUuid;)[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceData](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getServiceData(android.os.ParcelUuid)) + pub fn getServiceData_ParcelUuid<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getServiceData", .descriptor == "(Landroid/os/ParcelUuid;)[B" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getServiceData\0", + "(Landroid/os/ParcelUuid;)[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getTxPowerLevel()) - pub fn getTxPowerLevel<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getTxPowerLevel", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getTxPowerLevel\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getTxPowerLevel](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getTxPowerLevel()) + pub fn getTxPowerLevel<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getTxPowerLevel", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getTxPowerLevel\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDeviceName](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getDeviceName()) - pub fn getDeviceName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getDeviceName", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getDeviceName\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDeviceName](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getDeviceName()) + pub fn getDeviceName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getDeviceName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getDeviceName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getAdvertisingDataMap](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getAdvertisingDataMap()) - pub fn getAdvertisingDataMap<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::Map>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getAdvertisingDataMap", .descriptor == "()Ljava/util/Map;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getAdvertisingDataMap\0", "()Ljava/util/Map;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getAdvertisingDataMap](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getAdvertisingDataMap()) + pub fn getAdvertisingDataMap<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::Map>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getAdvertisingDataMap", .descriptor == "()Ljava/util/Map;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "getAdvertisingDataMap\0", + "()Ljava/util/Map;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getBytes](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getBytes()) - pub fn getBytes<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getBytes", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getBytes\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBytes](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#getBytes()) + pub fn getBytes<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "getBytes", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "getBytes\0", "()[B\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanRecord\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanRecord", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanRecord\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [DATA_TYPE_3D_INFORMATION_DATA](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_3D_INFORMATION_DATA) - pub const DATA_TYPE_3D_INFORMATION_DATA : i32 = 61; + /// public static final [DATA_TYPE_3D_INFORMATION_DATA](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_3D_INFORMATION_DATA) + pub const DATA_TYPE_3D_INFORMATION_DATA: i32 = 61; - /// public static final [DATA_TYPE_ADVERTISING_INTERVAL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_ADVERTISING_INTERVAL) - pub const DATA_TYPE_ADVERTISING_INTERVAL : i32 = 26; + /// public static final [DATA_TYPE_ADVERTISING_INTERVAL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_ADVERTISING_INTERVAL) + pub const DATA_TYPE_ADVERTISING_INTERVAL: i32 = 26; - /// public static final [DATA_TYPE_ADVERTISING_INTERVAL_LONG](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_ADVERTISING_INTERVAL_LONG) - pub const DATA_TYPE_ADVERTISING_INTERVAL_LONG : i32 = 47; + /// public static final [DATA_TYPE_ADVERTISING_INTERVAL_LONG](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_ADVERTISING_INTERVAL_LONG) + pub const DATA_TYPE_ADVERTISING_INTERVAL_LONG: i32 = 47; - /// public static final [DATA_TYPE_APPEARANCE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_APPEARANCE) - pub const DATA_TYPE_APPEARANCE : i32 = 25; + /// public static final [DATA_TYPE_APPEARANCE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_APPEARANCE) + pub const DATA_TYPE_APPEARANCE: i32 = 25; - /// public static final [DATA_TYPE_BIG_INFO](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_BIG_INFO) - pub const DATA_TYPE_BIG_INFO : i32 = 44; + /// public static final [DATA_TYPE_BIG_INFO](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_BIG_INFO) + pub const DATA_TYPE_BIG_INFO: i32 = 44; - /// public static final [DATA_TYPE_BROADCAST_CODE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_BROADCAST_CODE) - pub const DATA_TYPE_BROADCAST_CODE : i32 = 45; + /// public static final [DATA_TYPE_BROADCAST_CODE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_BROADCAST_CODE) + pub const DATA_TYPE_BROADCAST_CODE: i32 = 45; - /// public static final [DATA_TYPE_CHANNEL_MAP_UPDATE_INDICATION](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_CHANNEL_MAP_UPDATE_INDICATION) - pub const DATA_TYPE_CHANNEL_MAP_UPDATE_INDICATION : i32 = 40; + /// public static final [DATA_TYPE_CHANNEL_MAP_UPDATE_INDICATION](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_CHANNEL_MAP_UPDATE_INDICATION) + pub const DATA_TYPE_CHANNEL_MAP_UPDATE_INDICATION: i32 = 40; - /// public static final [DATA_TYPE_CLASS_OF_DEVICE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_CLASS_OF_DEVICE) - pub const DATA_TYPE_CLASS_OF_DEVICE : i32 = 13; + /// public static final [DATA_TYPE_CLASS_OF_DEVICE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_CLASS_OF_DEVICE) + pub const DATA_TYPE_CLASS_OF_DEVICE: i32 = 13; - /// public static final [DATA_TYPE_DEVICE_ID](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_DEVICE_ID) - pub const DATA_TYPE_DEVICE_ID : i32 = 16; + /// public static final [DATA_TYPE_DEVICE_ID](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_DEVICE_ID) + pub const DATA_TYPE_DEVICE_ID: i32 = 16; - /// public static final [DATA_TYPE_FLAGS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_FLAGS) - pub const DATA_TYPE_FLAGS : i32 = 1; + /// public static final [DATA_TYPE_FLAGS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_FLAGS) + pub const DATA_TYPE_FLAGS: i32 = 1; - /// public static final [DATA_TYPE_INDOOR_POSITIONING](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_INDOOR_POSITIONING) - pub const DATA_TYPE_INDOOR_POSITIONING : i32 = 37; + /// public static final [DATA_TYPE_INDOOR_POSITIONING](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_INDOOR_POSITIONING) + pub const DATA_TYPE_INDOOR_POSITIONING: i32 = 37; - /// public static final [DATA_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS) - pub const DATA_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS : i32 = 27; + /// public static final [DATA_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS) + pub const DATA_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS: i32 = 27; - /// public static final [DATA_TYPE_LE_ROLE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_ROLE) - pub const DATA_TYPE_LE_ROLE : i32 = 28; + /// public static final [DATA_TYPE_LE_ROLE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_ROLE) + pub const DATA_TYPE_LE_ROLE: i32 = 28; - /// public static final [DATA_TYPE_LE_SECURE_CONNECTIONS_CONFIRMATION_VALUE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_SECURE_CONNECTIONS_CONFIRMATION_VALUE) - pub const DATA_TYPE_LE_SECURE_CONNECTIONS_CONFIRMATION_VALUE : i32 = 34; + /// public static final [DATA_TYPE_LE_SECURE_CONNECTIONS_CONFIRMATION_VALUE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_SECURE_CONNECTIONS_CONFIRMATION_VALUE) + pub const DATA_TYPE_LE_SECURE_CONNECTIONS_CONFIRMATION_VALUE: i32 = 34; - /// public static final [DATA_TYPE_LE_SECURE_CONNECTIONS_RANDOM_VALUE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_SECURE_CONNECTIONS_RANDOM_VALUE) - pub const DATA_TYPE_LE_SECURE_CONNECTIONS_RANDOM_VALUE : i32 = 35; + /// public static final [DATA_TYPE_LE_SECURE_CONNECTIONS_RANDOM_VALUE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_SECURE_CONNECTIONS_RANDOM_VALUE) + pub const DATA_TYPE_LE_SECURE_CONNECTIONS_RANDOM_VALUE: i32 = 35; - /// public static final [DATA_TYPE_LE_SUPPORTED_FEATURES](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_SUPPORTED_FEATURES) - pub const DATA_TYPE_LE_SUPPORTED_FEATURES : i32 = 39; + /// public static final [DATA_TYPE_LE_SUPPORTED_FEATURES](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LE_SUPPORTED_FEATURES) + pub const DATA_TYPE_LE_SUPPORTED_FEATURES: i32 = 39; - /// public static final [DATA_TYPE_LOCAL_NAME_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LOCAL_NAME_COMPLETE) - pub const DATA_TYPE_LOCAL_NAME_COMPLETE : i32 = 9; + /// public static final [DATA_TYPE_LOCAL_NAME_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LOCAL_NAME_COMPLETE) + pub const DATA_TYPE_LOCAL_NAME_COMPLETE: i32 = 9; - /// public static final [DATA_TYPE_LOCAL_NAME_SHORT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LOCAL_NAME_SHORT) - pub const DATA_TYPE_LOCAL_NAME_SHORT : i32 = 8; + /// public static final [DATA_TYPE_LOCAL_NAME_SHORT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_LOCAL_NAME_SHORT) + pub const DATA_TYPE_LOCAL_NAME_SHORT: i32 = 8; - /// public static final [DATA_TYPE_MANUFACTURER_SPECIFIC_DATA](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_MANUFACTURER_SPECIFIC_DATA) - pub const DATA_TYPE_MANUFACTURER_SPECIFIC_DATA : i32 = 255; + /// public static final [DATA_TYPE_MANUFACTURER_SPECIFIC_DATA](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_MANUFACTURER_SPECIFIC_DATA) + pub const DATA_TYPE_MANUFACTURER_SPECIFIC_DATA: i32 = 255; - /// public static final [DATA_TYPE_MESH_BEACON](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_MESH_BEACON) - pub const DATA_TYPE_MESH_BEACON : i32 = 43; + /// public static final [DATA_TYPE_MESH_BEACON](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_MESH_BEACON) + pub const DATA_TYPE_MESH_BEACON: i32 = 43; - /// public static final [DATA_TYPE_MESH_MESSAGE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_MESH_MESSAGE) - pub const DATA_TYPE_MESH_MESSAGE : i32 = 42; + /// public static final [DATA_TYPE_MESH_MESSAGE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_MESH_MESSAGE) + pub const DATA_TYPE_MESH_MESSAGE: i32 = 42; - /// public static final [DATA_TYPE_NONE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_NONE) - pub const DATA_TYPE_NONE : i32 = -1; + /// public static final [DATA_TYPE_NONE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_NONE) + pub const DATA_TYPE_NONE: i32 = -1; - /// public static final [DATA_TYPE_PB_ADV](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_PB_ADV) - pub const DATA_TYPE_PB_ADV : i32 = 41; + /// public static final [DATA_TYPE_PB_ADV](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_PB_ADV) + pub const DATA_TYPE_PB_ADV: i32 = 41; - /// public static final [DATA_TYPE_PUBLIC_TARGET_ADDRESS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_PUBLIC_TARGET_ADDRESS) - pub const DATA_TYPE_PUBLIC_TARGET_ADDRESS : i32 = 23; + /// public static final [DATA_TYPE_PUBLIC_TARGET_ADDRESS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_PUBLIC_TARGET_ADDRESS) + pub const DATA_TYPE_PUBLIC_TARGET_ADDRESS: i32 = 23; - /// public static final [DATA_TYPE_RANDOM_TARGET_ADDRESS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_RANDOM_TARGET_ADDRESS) - pub const DATA_TYPE_RANDOM_TARGET_ADDRESS : i32 = 24; + /// public static final [DATA_TYPE_RANDOM_TARGET_ADDRESS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_RANDOM_TARGET_ADDRESS) + pub const DATA_TYPE_RANDOM_TARGET_ADDRESS: i32 = 24; - /// public static final [DATA_TYPE_RESOLVABLE_SET_IDENTIFIER](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_RESOLVABLE_SET_IDENTIFIER) - pub const DATA_TYPE_RESOLVABLE_SET_IDENTIFIER : i32 = 46; + /// public static final [DATA_TYPE_RESOLVABLE_SET_IDENTIFIER](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_RESOLVABLE_SET_IDENTIFIER) + pub const DATA_TYPE_RESOLVABLE_SET_IDENTIFIER: i32 = 46; - /// public static final [DATA_TYPE_SECURITY_MANAGER_OUT_OF_BAND_FLAGS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SECURITY_MANAGER_OUT_OF_BAND_FLAGS) - pub const DATA_TYPE_SECURITY_MANAGER_OUT_OF_BAND_FLAGS : i32 = 17; + /// public static final [DATA_TYPE_SECURITY_MANAGER_OUT_OF_BAND_FLAGS](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SECURITY_MANAGER_OUT_OF_BAND_FLAGS) + pub const DATA_TYPE_SECURITY_MANAGER_OUT_OF_BAND_FLAGS: i32 = 17; - /// public static final [DATA_TYPE_SERVICE_DATA_128_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_DATA_128_BIT) - pub const DATA_TYPE_SERVICE_DATA_128_BIT : i32 = 33; + /// public static final [DATA_TYPE_SERVICE_DATA_128_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_DATA_128_BIT) + pub const DATA_TYPE_SERVICE_DATA_128_BIT: i32 = 33; - /// public static final [DATA_TYPE_SERVICE_DATA_16_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_DATA_16_BIT) - pub const DATA_TYPE_SERVICE_DATA_16_BIT : i32 = 22; + /// public static final [DATA_TYPE_SERVICE_DATA_16_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_DATA_16_BIT) + pub const DATA_TYPE_SERVICE_DATA_16_BIT: i32 = 22; - /// public static final [DATA_TYPE_SERVICE_DATA_32_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_DATA_32_BIT) - pub const DATA_TYPE_SERVICE_DATA_32_BIT : i32 = 32; + /// public static final [DATA_TYPE_SERVICE_DATA_32_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_DATA_32_BIT) + pub const DATA_TYPE_SERVICE_DATA_32_BIT: i32 = 32; - /// public static final [DATA_TYPE_SERVICE_SOLICITATION_UUIDS_128_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_SOLICITATION_UUIDS_128_BIT) - pub const DATA_TYPE_SERVICE_SOLICITATION_UUIDS_128_BIT : i32 = 21; + /// public static final [DATA_TYPE_SERVICE_SOLICITATION_UUIDS_128_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_SOLICITATION_UUIDS_128_BIT) + pub const DATA_TYPE_SERVICE_SOLICITATION_UUIDS_128_BIT: i32 = 21; - /// public static final [DATA_TYPE_SERVICE_SOLICITATION_UUIDS_16_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_SOLICITATION_UUIDS_16_BIT) - pub const DATA_TYPE_SERVICE_SOLICITATION_UUIDS_16_BIT : i32 = 20; + /// public static final [DATA_TYPE_SERVICE_SOLICITATION_UUIDS_16_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_SOLICITATION_UUIDS_16_BIT) + pub const DATA_TYPE_SERVICE_SOLICITATION_UUIDS_16_BIT: i32 = 20; - /// public static final [DATA_TYPE_SERVICE_SOLICITATION_UUIDS_32_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_SOLICITATION_UUIDS_32_BIT) - pub const DATA_TYPE_SERVICE_SOLICITATION_UUIDS_32_BIT : i32 = 31; + /// public static final [DATA_TYPE_SERVICE_SOLICITATION_UUIDS_32_BIT](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_SOLICITATION_UUIDS_32_BIT) + pub const DATA_TYPE_SERVICE_SOLICITATION_UUIDS_32_BIT: i32 = 31; - /// public static final [DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE) - pub const DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE : i32 = 7; + /// public static final [DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE) + pub const DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE: i32 = 7; - /// public static final [DATA_TYPE_SERVICE_UUIDS_128_BIT_PARTIAL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_128_BIT_PARTIAL) - pub const DATA_TYPE_SERVICE_UUIDS_128_BIT_PARTIAL : i32 = 6; + /// public static final [DATA_TYPE_SERVICE_UUIDS_128_BIT_PARTIAL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_128_BIT_PARTIAL) + pub const DATA_TYPE_SERVICE_UUIDS_128_BIT_PARTIAL: i32 = 6; - /// public static final [DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE) - pub const DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE : i32 = 3; + /// public static final [DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE) + pub const DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE: i32 = 3; - /// public static final [DATA_TYPE_SERVICE_UUIDS_16_BIT_PARTIAL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_16_BIT_PARTIAL) - pub const DATA_TYPE_SERVICE_UUIDS_16_BIT_PARTIAL : i32 = 2; + /// public static final [DATA_TYPE_SERVICE_UUIDS_16_BIT_PARTIAL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_16_BIT_PARTIAL) + pub const DATA_TYPE_SERVICE_UUIDS_16_BIT_PARTIAL: i32 = 2; - /// public static final [DATA_TYPE_SERVICE_UUIDS_32_BIT_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_32_BIT_COMPLETE) - pub const DATA_TYPE_SERVICE_UUIDS_32_BIT_COMPLETE : i32 = 5; + /// public static final [DATA_TYPE_SERVICE_UUIDS_32_BIT_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_32_BIT_COMPLETE) + pub const DATA_TYPE_SERVICE_UUIDS_32_BIT_COMPLETE: i32 = 5; - /// public static final [DATA_TYPE_SERVICE_UUIDS_32_BIT_PARTIAL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_32_BIT_PARTIAL) - pub const DATA_TYPE_SERVICE_UUIDS_32_BIT_PARTIAL : i32 = 4; + /// public static final [DATA_TYPE_SERVICE_UUIDS_32_BIT_PARTIAL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SERVICE_UUIDS_32_BIT_PARTIAL) + pub const DATA_TYPE_SERVICE_UUIDS_32_BIT_PARTIAL: i32 = 4; - /// public static final [DATA_TYPE_SIMPLE_PAIRING_HASH_C](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SIMPLE_PAIRING_HASH_C) - pub const DATA_TYPE_SIMPLE_PAIRING_HASH_C : i32 = 14; + /// public static final [DATA_TYPE_SIMPLE_PAIRING_HASH_C](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SIMPLE_PAIRING_HASH_C) + pub const DATA_TYPE_SIMPLE_PAIRING_HASH_C: i32 = 14; - /// public static final [DATA_TYPE_SIMPLE_PAIRING_HASH_C_256](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SIMPLE_PAIRING_HASH_C_256) - pub const DATA_TYPE_SIMPLE_PAIRING_HASH_C_256 : i32 = 29; + /// public static final [DATA_TYPE_SIMPLE_PAIRING_HASH_C_256](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SIMPLE_PAIRING_HASH_C_256) + pub const DATA_TYPE_SIMPLE_PAIRING_HASH_C_256: i32 = 29; - /// public static final [DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R) - pub const DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R : i32 = 15; + /// public static final [DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R) + pub const DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R: i32 = 15; - /// public static final [DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R_256](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R_256) - pub const DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R_256 : i32 = 30; + /// public static final [DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R_256](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R_256) + pub const DATA_TYPE_SIMPLE_PAIRING_RANDOMIZER_R_256: i32 = 30; - /// public static final [DATA_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE) - pub const DATA_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE : i32 = 18; + /// public static final [DATA_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE) + pub const DATA_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE: i32 = 18; - /// public static final [DATA_TYPE_TRANSPORT_DISCOVERY_DATA](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_TRANSPORT_DISCOVERY_DATA) - pub const DATA_TYPE_TRANSPORT_DISCOVERY_DATA : i32 = 38; + /// public static final [DATA_TYPE_TRANSPORT_DISCOVERY_DATA](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_TRANSPORT_DISCOVERY_DATA) + pub const DATA_TYPE_TRANSPORT_DISCOVERY_DATA: i32 = 38; - /// public static final [DATA_TYPE_TX_POWER_LEVEL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_TX_POWER_LEVEL) - pub const DATA_TYPE_TX_POWER_LEVEL : i32 = 10; + /// public static final [DATA_TYPE_TX_POWER_LEVEL](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_TX_POWER_LEVEL) + pub const DATA_TYPE_TX_POWER_LEVEL: i32 = 10; - /// public static final [DATA_TYPE_URI](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_URI) - pub const DATA_TYPE_URI : i32 = 36; - } + /// public static final [DATA_TYPE_URI](https://developer.android.com/reference/android/bluetooth/le/ScanRecord.html#DATA_TYPE_URI) + pub const DATA_TYPE_URI: i32 = 36; } - ::java_spaghetti::class! { - /// public final class [ScanResult](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html) - public final class ScanResult ("android/bluetooth/le/ScanResult\0") extends super::super::super::java::lang::Object, implements super::super::os::Parcelable { + /// pub final class [ScanResult](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html) + #[repr(transparent)] + pub struct ScanResult(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for ScanResult {} - /// [ScanResult](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#ScanResult(android.bluetooth.BluetoothDevice,%20android.bluetooth.le.ScanRecord,%20int,%20long)) - #[deprecated] pub fn new_BluetoothDevice_ScanRecord_int_long<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::BluetoothDevice>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env ScanRecord>>, arg2: i32, arg3: i64) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/le/ScanRecord;IJ)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "\0", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/le/ScanRecord;IJ)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for ScanResult { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/ScanResult\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for ScanResult {} + unsafe impl ::java_spaghetti::AssignableTo for ScanResult {} + impl ::std::ops::Deref for ScanResult { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for ScanResult { + fn as_ref(&self) -> &super::super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::super::os::Parcelable) } + } + } + impl ScanResult { + /// [ScanResult](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#ScanResult(android.bluetooth.BluetoothDevice,%20android.bluetooth.le.ScanRecord,%20int,%20long)) + #[deprecated] + pub fn new_BluetoothDevice_ScanRecord_int_long<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: i32, + arg3: i64, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/le/ScanRecord;IJ)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "\0", + "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/le/ScanRecord;IJ)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [ScanResult](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#ScanResult(android.bluetooth.BluetoothDevice,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20android.bluetooth.le.ScanRecord,%20long)) - pub fn new_BluetoothDevice_int_int_int_int_int_int_int_ScanRecord_long<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::BluetoothDevice>>, arg1: i32, arg2: i32, arg3: i32, arg4: i32, arg5: i32, arg6: i32, arg7: i32, arg8: impl ::std::convert::Into<::std::option::Option<&'env ScanRecord>>, arg9: i64) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "", .descriptor == "(Landroid/bluetooth/BluetoothDevice;IIIIIIILandroid/bluetooth/le/ScanRecord;J)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3), ::java_spaghetti::AsJValue::as_jvalue(&arg4), ::java_spaghetti::AsJValue::as_jvalue(&arg5), ::java_spaghetti::AsJValue::as_jvalue(&arg6), ::java_spaghetti::AsJValue::as_jvalue(&arg7), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg9)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "\0", "(Landroid/bluetooth/BluetoothDevice;IIIIIIILandroid/bluetooth/le/ScanRecord;J)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [ScanResult](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#ScanResult(android.bluetooth.BluetoothDevice,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20android.bluetooth.le.ScanRecord,%20long)) + pub fn new_BluetoothDevice_int_int_int_int_int_int_int_ScanRecord_long<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + arg3: i32, + arg4: i32, + arg5: i32, + arg6: i32, + arg7: i32, + arg8: impl ::java_spaghetti::AsArg, + arg9: i64, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "", .descriptor == "(Landroid/bluetooth/BluetoothDevice;IIIIIIILandroid/bluetooth/le/ScanRecord;J)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ::java_spaghetti::AsJValue::as_jvalue(&arg4), + ::java_spaghetti::AsJValue::as_jvalue(&arg5), + ::java_spaghetti::AsJValue::as_jvalue(&arg6), + ::java_spaghetti::AsJValue::as_jvalue(&arg7), + arg8.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg9), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "\0", + "(Landroid/bluetooth/BluetoothDevice;IIIIIIILandroid/bluetooth/le/ScanRecord;J)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevice](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getDevice()) - pub fn getDevice<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::BluetoothDevice>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getDevice", .descriptor == "()Landroid/bluetooth/BluetoothDevice;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getDevice\0", "()Landroid/bluetooth/BluetoothDevice;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevice](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getDevice()) + pub fn getDevice<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::BluetoothDevice>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getDevice", .descriptor == "()Landroid/bluetooth/BluetoothDevice;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "getDevice\0", + "()Landroid/bluetooth/BluetoothDevice;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getScanRecord](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getScanRecord()) - pub fn getScanRecord<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanRecord>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getScanRecord", .descriptor == "()Landroid/bluetooth/le/ScanRecord;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getScanRecord\0", "()Landroid/bluetooth/le/ScanRecord;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getScanRecord](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getScanRecord()) + pub fn getScanRecord<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanRecord>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getScanRecord", .descriptor == "()Landroid/bluetooth/le/ScanRecord;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "getScanRecord\0", + "()Landroid/bluetooth/le/ScanRecord;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getRssi](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getRssi()) - pub fn getRssi<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getRssi", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getRssi\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getRssi](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getRssi()) + pub fn getRssi<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getRssi", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getRssi\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getTimestampNanos](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getTimestampNanos()) - pub fn getTimestampNanos<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getTimestampNanos", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getTimestampNanos\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getTimestampNanos](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getTimestampNanos()) + pub fn getTimestampNanos<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getTimestampNanos", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "getTimestampNanos\0", + "()J\0", + ); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isLegacy](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#isLegacy()) - pub fn isLegacy<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "isLegacy", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "isLegacy\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isLegacy](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#isLegacy()) + pub fn isLegacy<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "isLegacy", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "isLegacy\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isConnectable](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#isConnectable()) - pub fn isConnectable<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "isConnectable", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "isConnectable\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isConnectable](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#isConnectable()) + pub fn isConnectable<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "isConnectable", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "isConnectable\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDataStatus](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getDataStatus()) - pub fn getDataStatus<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getDataStatus", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getDataStatus\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDataStatus](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getDataStatus()) + pub fn getDataStatus<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getDataStatus", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "getDataStatus\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getPrimaryPhy](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getPrimaryPhy()) - pub fn getPrimaryPhy<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getPrimaryPhy", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getPrimaryPhy\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getPrimaryPhy](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getPrimaryPhy()) + pub fn getPrimaryPhy<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getPrimaryPhy", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "getPrimaryPhy\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getSecondaryPhy](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getSecondaryPhy()) - pub fn getSecondaryPhy<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getSecondaryPhy", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getSecondaryPhy\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getSecondaryPhy](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getSecondaryPhy()) + pub fn getSecondaryPhy<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getSecondaryPhy", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "getSecondaryPhy\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getAdvertisingSid](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getAdvertisingSid()) - pub fn getAdvertisingSid<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getAdvertisingSid", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getAdvertisingSid\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getAdvertisingSid](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getAdvertisingSid()) + pub fn getAdvertisingSid<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getAdvertisingSid", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "getAdvertisingSid\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getTxPower](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getTxPower()) - pub fn getTxPower<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getTxPower", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getTxPower\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getTxPower](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getTxPower()) + pub fn getTxPower<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getTxPower", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "getTxPower\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getPeriodicAdvertisingInterval](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getPeriodicAdvertisingInterval()) - pub fn getPeriodicAdvertisingInterval<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getPeriodicAdvertisingInterval", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "getPeriodicAdvertisingInterval\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getPeriodicAdvertisingInterval](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#getPeriodicAdvertisingInterval()) + pub fn getPeriodicAdvertisingInterval<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "getPeriodicAdvertisingInterval", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "getPeriodicAdvertisingInterval\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanResult\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanResult", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanResult\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [DATA_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#DATA_COMPLETE) - pub const DATA_COMPLETE : i32 = 0; + /// public static final [DATA_COMPLETE](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#DATA_COMPLETE) + pub const DATA_COMPLETE: i32 = 0; - /// public static final [DATA_TRUNCATED](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#DATA_TRUNCATED) - pub const DATA_TRUNCATED : i32 = 2; + /// public static final [DATA_TRUNCATED](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#DATA_TRUNCATED) + pub const DATA_TRUNCATED: i32 = 2; - /// public static final [PERIODIC_INTERVAL_NOT_PRESENT](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#PERIODIC_INTERVAL_NOT_PRESENT) - pub const PERIODIC_INTERVAL_NOT_PRESENT : i32 = 0; + /// public static final [PERIODIC_INTERVAL_NOT_PRESENT](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#PERIODIC_INTERVAL_NOT_PRESENT) + pub const PERIODIC_INTERVAL_NOT_PRESENT: i32 = 0; - /// public static final [PHY_UNUSED](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#PHY_UNUSED) - pub const PHY_UNUSED : i32 = 0; + /// public static final [PHY_UNUSED](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#PHY_UNUSED) + pub const PHY_UNUSED: i32 = 0; - /// public static final [SID_NOT_PRESENT](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#SID_NOT_PRESENT) - pub const SID_NOT_PRESENT : i32 = 255; + /// public static final [SID_NOT_PRESENT](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#SID_NOT_PRESENT) + pub const SID_NOT_PRESENT: i32 = 255; - /// public static final [TX_POWER_NOT_PRESENT](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#TX_POWER_NOT_PRESENT) - pub const TX_POWER_NOT_PRESENT : i32 = 127; - } + /// public static final [TX_POWER_NOT_PRESENT](https://developer.android.com/reference/android/bluetooth/le/ScanResult.html#TX_POWER_NOT_PRESENT) + pub const TX_POWER_NOT_PRESENT: i32 = 127; } - ::java_spaghetti::class! { - /// public final class [ScanSettings](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html) - public final class ScanSettings ("android/bluetooth/le/ScanSettings\0") extends super::super::super::java::lang::Object, implements super::super::os::Parcelable { + /// pub final class [ScanSettings](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html) + #[repr(transparent)] + pub struct ScanSettings(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for ScanSettings {} - /// [getScanMode](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getScanMode()) - pub fn getScanMode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getScanMode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings\0", "getScanMode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for ScanSettings { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/ScanSettings\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for ScanSettings {} + unsafe impl ::java_spaghetti::AssignableTo for ScanSettings {} + impl ::std::ops::Deref for ScanSettings { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for ScanSettings { + fn as_ref(&self) -> &super::super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::super::os::Parcelable) } + } + } + impl ScanSettings { + /// [getScanMode](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getScanMode()) + pub fn getScanMode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getScanMode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings\0", + "getScanMode\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCallbackType](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getCallbackType()) - pub fn getCallbackType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getCallbackType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings\0", "getCallbackType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCallbackType](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getCallbackType()) + pub fn getCallbackType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getCallbackType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings\0", + "getCallbackType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getScanResultType](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getScanResultType()) - pub fn getScanResultType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getScanResultType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings\0", "getScanResultType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getScanResultType](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getScanResultType()) + pub fn getScanResultType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getScanResultType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings\0", + "getScanResultType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getLegacy](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getLegacy()) - pub fn getLegacy<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getLegacy", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings\0", "getLegacy\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getLegacy](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getLegacy()) + pub fn getLegacy<'env>( + &'env self, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getLegacy", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings\0", + "getLegacy\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getPhy](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getPhy()) - pub fn getPhy<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getPhy", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings\0", "getPhy\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getPhy](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getPhy()) + pub fn getPhy<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getPhy", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/le/ScanSettings\0", "getPhy\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getReportDelayMillis](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getReportDelayMillis()) - pub fn getReportDelayMillis<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getReportDelayMillis", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings\0", "getReportDelayMillis\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getReportDelayMillis](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#getReportDelayMillis()) + pub fn getReportDelayMillis<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "getReportDelayMillis", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings\0", + "getReportDelayMillis\0", + "()J\0", + ); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/ScanSettings", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [CALLBACK_TYPE_ALL_MATCHES](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#CALLBACK_TYPE_ALL_MATCHES) - pub const CALLBACK_TYPE_ALL_MATCHES : i32 = 1; + /// public static final [CALLBACK_TYPE_ALL_MATCHES](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#CALLBACK_TYPE_ALL_MATCHES) + pub const CALLBACK_TYPE_ALL_MATCHES: i32 = 1; - /// public static final [CALLBACK_TYPE_FIRST_MATCH](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#CALLBACK_TYPE_FIRST_MATCH) - pub const CALLBACK_TYPE_FIRST_MATCH : i32 = 2; + /// public static final [CALLBACK_TYPE_FIRST_MATCH](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#CALLBACK_TYPE_FIRST_MATCH) + pub const CALLBACK_TYPE_FIRST_MATCH: i32 = 2; - /// public static final [CALLBACK_TYPE_MATCH_LOST](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#CALLBACK_TYPE_MATCH_LOST) - pub const CALLBACK_TYPE_MATCH_LOST : i32 = 4; + /// public static final [CALLBACK_TYPE_MATCH_LOST](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#CALLBACK_TYPE_MATCH_LOST) + pub const CALLBACK_TYPE_MATCH_LOST: i32 = 4; - /// public static final [MATCH_MODE_AGGRESSIVE](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_MODE_AGGRESSIVE) - pub const MATCH_MODE_AGGRESSIVE : i32 = 1; + /// public static final [MATCH_MODE_AGGRESSIVE](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_MODE_AGGRESSIVE) + pub const MATCH_MODE_AGGRESSIVE: i32 = 1; - /// public static final [MATCH_MODE_STICKY](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_MODE_STICKY) - pub const MATCH_MODE_STICKY : i32 = 2; + /// public static final [MATCH_MODE_STICKY](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_MODE_STICKY) + pub const MATCH_MODE_STICKY: i32 = 2; - /// public static final [MATCH_NUM_FEW_ADVERTISEMENT](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_NUM_FEW_ADVERTISEMENT) - pub const MATCH_NUM_FEW_ADVERTISEMENT : i32 = 2; + /// public static final [MATCH_NUM_FEW_ADVERTISEMENT](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_NUM_FEW_ADVERTISEMENT) + pub const MATCH_NUM_FEW_ADVERTISEMENT: i32 = 2; - /// public static final [MATCH_NUM_MAX_ADVERTISEMENT](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_NUM_MAX_ADVERTISEMENT) - pub const MATCH_NUM_MAX_ADVERTISEMENT : i32 = 3; + /// public static final [MATCH_NUM_MAX_ADVERTISEMENT](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_NUM_MAX_ADVERTISEMENT) + pub const MATCH_NUM_MAX_ADVERTISEMENT: i32 = 3; - /// public static final [MATCH_NUM_ONE_ADVERTISEMENT](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_NUM_ONE_ADVERTISEMENT) - pub const MATCH_NUM_ONE_ADVERTISEMENT : i32 = 1; + /// public static final [MATCH_NUM_ONE_ADVERTISEMENT](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#MATCH_NUM_ONE_ADVERTISEMENT) + pub const MATCH_NUM_ONE_ADVERTISEMENT: i32 = 1; - /// public static final [PHY_LE_ALL_SUPPORTED](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#PHY_LE_ALL_SUPPORTED) - pub const PHY_LE_ALL_SUPPORTED : i32 = 255; + /// public static final [PHY_LE_ALL_SUPPORTED](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#PHY_LE_ALL_SUPPORTED) + pub const PHY_LE_ALL_SUPPORTED: i32 = 255; - /// public static final [SCAN_MODE_BALANCED](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#SCAN_MODE_BALANCED) - pub const SCAN_MODE_BALANCED : i32 = 1; + /// public static final [SCAN_MODE_BALANCED](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#SCAN_MODE_BALANCED) + pub const SCAN_MODE_BALANCED: i32 = 1; - /// public static final [SCAN_MODE_LOW_LATENCY](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#SCAN_MODE_LOW_LATENCY) - pub const SCAN_MODE_LOW_LATENCY : i32 = 2; + /// public static final [SCAN_MODE_LOW_LATENCY](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#SCAN_MODE_LOW_LATENCY) + pub const SCAN_MODE_LOW_LATENCY: i32 = 2; - /// public static final [SCAN_MODE_LOW_POWER](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#SCAN_MODE_LOW_POWER) - pub const SCAN_MODE_LOW_POWER : i32 = 0; + /// public static final [SCAN_MODE_LOW_POWER](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#SCAN_MODE_LOW_POWER) + pub const SCAN_MODE_LOW_POWER: i32 = 0; - /// public static final [SCAN_MODE_OPPORTUNISTIC](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#SCAN_MODE_OPPORTUNISTIC) - pub const SCAN_MODE_OPPORTUNISTIC : i32 = -1; - } + /// public static final [SCAN_MODE_OPPORTUNISTIC](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.html#SCAN_MODE_OPPORTUNISTIC) + pub const SCAN_MODE_OPPORTUNISTIC: i32 = -1; } - ::java_spaghetti::class! { - /// public final class [ScanSettings.Builder](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html) - public final class ScanSettings_Builder ("android/bluetooth/le/ScanSettings$Builder\0") extends super::super::super::java::lang::Object { + /// pub final class [ScanSettings.Builder](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html) + #[repr(transparent)] + pub struct ScanSettings_Builder(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for ScanSettings_Builder {} - /// [Builder](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#Builder()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings$Builder\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for ScanSettings_Builder { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/ScanSettings$Builder\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for ScanSettings_Builder {} + impl ::std::ops::Deref for ScanSettings_Builder { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ScanSettings_Builder { + /// [Builder](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#Builder()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings$Builder\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [setScanMode](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setScanMode(int)) - pub fn setScanMode<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setScanMode", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings$Builder\0", "setScanMode\0", "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setScanMode](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setScanMode(int)) + pub fn setScanMode<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setScanMode", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings$Builder\0", + "setScanMode\0", + "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCallbackType](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setCallbackType(int)) - pub fn setCallbackType<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setCallbackType", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings$Builder\0", "setCallbackType\0", "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCallbackType](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setCallbackType(int)) + pub fn setCallbackType<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setCallbackType", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings$Builder\0", + "setCallbackType\0", + "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setReportDelay](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setReportDelay(long)) - pub fn setReportDelay<'env>(&'env self, arg0: i64) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setReportDelay", .descriptor == "(J)Landroid/bluetooth/le/ScanSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings$Builder\0", "setReportDelay\0", "(J)Landroid/bluetooth/le/ScanSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setReportDelay](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setReportDelay(long)) + pub fn setReportDelay<'env>( + &'env self, + arg0: i64, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setReportDelay", .descriptor == "(J)Landroid/bluetooth/le/ScanSettings$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings$Builder\0", + "setReportDelay\0", + "(J)Landroid/bluetooth/le/ScanSettings$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setNumOfMatches](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setNumOfMatches(int)) - pub fn setNumOfMatches<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setNumOfMatches", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings$Builder\0", "setNumOfMatches\0", "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setNumOfMatches](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setNumOfMatches(int)) + pub fn setNumOfMatches<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setNumOfMatches", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings$Builder\0", + "setNumOfMatches\0", + "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setMatchMode](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setMatchMode(int)) - pub fn setMatchMode<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setMatchMode", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings$Builder\0", "setMatchMode\0", "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setMatchMode](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setMatchMode(int)) + pub fn setMatchMode<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setMatchMode", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings$Builder\0", + "setMatchMode\0", + "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setLegacy](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setLegacy(boolean)) - pub fn setLegacy<'env>(&'env self, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setLegacy", .descriptor == "(Z)Landroid/bluetooth/le/ScanSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings$Builder\0", "setLegacy\0", "(Z)Landroid/bluetooth/le/ScanSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [setPhy](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setPhy(int)) - pub fn setPhy<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setPhy", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings$Builder\0", "setPhy\0", "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [build](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#build()) - pub fn build<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ScanSettings>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/ScanSettings;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/ScanSettings$Builder\0", "build\0", "()Landroid/bluetooth/le/ScanSettings;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - } - } - - ::java_spaghetti::class! { - /// public final class [TransportBlock](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html) - public final class TransportBlock ("android/bluetooth/le/TransportBlock\0") extends super::super::super::java::lang::Object, implements super::super::os::Parcelable { - - /// [TransportBlock](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#TransportBlock(int,%20int,%20int,%20byte%5B%5D)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: i32, arg1: i32, arg2: i32, arg3: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "", .descriptor == "(III[B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportBlock\0", "\0", "(III[B)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } - } - - /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportBlock\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [equals](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportBlock\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [getOrgId](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#getOrgId()) - pub fn getOrgId<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "getOrgId", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportBlock\0", "getOrgId\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [getTdsFlags](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#getTdsFlags()) - pub fn getTdsFlags<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "getTdsFlags", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportBlock\0", "getTdsFlags\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [getTransportDataLength](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#getTransportDataLength()) - pub fn getTransportDataLength<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "getTransportDataLength", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportBlock\0", "getTransportDataLength\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [getTransportData](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#getTransportData()) - pub fn getTransportData<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "getTransportData", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportBlock\0", "getTransportData\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [toByteArray](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#toByteArray()) - pub fn toByteArray<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "toByteArray", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportBlock\0", "toByteArray\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [totalBytes](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#totalBytes()) - pub fn totalBytes<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "totalBytes", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportBlock\0", "totalBytes\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - } - } - - ::java_spaghetti::class! { - /// public final class [TransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html) - public final class TransportDiscoveryData ("android/bluetooth/le/TransportDiscoveryData\0") extends super::super::super::java::lang::Object, implements super::super::os::Parcelable { - - /// [TransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#TransportDiscoveryData(int,%20java.util.List)) - pub fn new_int_List<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::util::List>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "", .descriptor == "(ILjava/util/List;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportDiscoveryData\0", "\0", "(ILjava/util/List;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } - } - - /// [TransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#TransportDiscoveryData(byte%5B%5D)) - pub fn new_byte_array<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "", .descriptor == "([B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportDiscoveryData\0", "\0", "([B)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } - } - - /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportDiscoveryData\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [equals](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportDiscoveryData\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [getTransportDataType](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#getTransportDataType()) - pub fn getTransportDataType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "getTransportDataType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportDiscoveryData\0", "getTransportDataType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [getTransportBlocks](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#getTransportBlocks()) - pub fn getTransportBlocks<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "getTransportBlocks", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportDiscoveryData\0", "getTransportBlocks\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [toByteArray](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#toByteArray()) - pub fn toByteArray<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "toByteArray", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportDiscoveryData\0", "toByteArray\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [totalBytes](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#totalBytes()) - pub fn totalBytes<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "totalBytes", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/le/TransportDiscoveryData\0", "totalBytes\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - } - } - } - - ::java_spaghetti::class! { - /// public final class [BluetoothA2dp](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html) - public final class BluetoothA2dp ("android/bluetooth/BluetoothA2dp\0") extends super::super::java::lang::Object, implements BluetoothProfile { - - /// [finalize](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#finalize()) - pub fn finalize<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "finalize", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothA2dp\0", "finalize\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#getConnectedDevices()) - pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + /// [setLegacy](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setLegacy(boolean)) + pub fn setLegacy<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setLegacy", .descriptor == "(Z)Landroid/bluetooth/le/ScanSettings$Builder;" unsafe { - let __jni_args = []; + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothA2dp\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings$Builder\0", + "setLegacy\0", + "(Z)Landroid/bluetooth/le/ScanSettings$Builder;\0", + ); __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#getDevicesMatchingConnectionStates(int%5B%5D)) - pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + /// [setPhy](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#setPhy(int)) + pub fn setPhy<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanSettings_Builder>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "setPhy", .descriptor == "(I)Landroid/bluetooth/le/ScanSettings$Builder;" unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothA2dp\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings$Builder\0", + "setPhy\0", + "(I)Landroid/bluetooth/le/ScanSettings$Builder;\0", + ); __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#getConnectionState(android.bluetooth.BluetoothDevice)) - pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothA2dp\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [isA2dpPlaying](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#isA2dpPlaying(android.bluetooth.BluetoothDevice)) - pub fn isA2dpPlaying<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "isA2dpPlaying", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" + /// [build](https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder.html#build()) + pub fn build<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ScanSettings>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/ScanSettings$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/le/ScanSettings;" unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; + let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothA2dp\0", "isA2dpPlaying\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/ScanSettings$Builder\0", + "build\0", + "()Landroid/bluetooth/le/ScanSettings;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - - /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#ACTION_CONNECTION_STATE_CHANGED) - pub const ACTION_CONNECTION_STATE_CHANGED : &'static str = "android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED"; - - /// public static final [ACTION_PLAYING_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#ACTION_PLAYING_STATE_CHANGED) - pub const ACTION_PLAYING_STATE_CHANGED : &'static str = "android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED"; - - /// public static final [STATE_NOT_PLAYING](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#STATE_NOT_PLAYING) - pub const STATE_NOT_PLAYING : i32 = 11; - - /// public static final [STATE_PLAYING](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#STATE_PLAYING) - pub const STATE_PLAYING : i32 = 10; } - } - - ::java_spaghetti::class! { - /// public final class [BluetoothAdapter](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html) - public final class BluetoothAdapter ("android/bluetooth/BluetoothAdapter\0") extends super::super::java::lang::Object { - /// [getDefaultAdapter](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getDefaultAdapter()) - #[deprecated] pub fn getDefaultAdapter<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothAdapter>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC | STATIC | SYNCRONIZED, .name == "getDefaultAdapter", .descriptor == "()Landroid/bluetooth/BluetoothAdapter;" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/bluetooth/BluetoothAdapter\0", "getDefaultAdapter\0", "()Landroid/bluetooth/BluetoothAdapter;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } - } + /// pub final class [TransportBlock](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html) + #[repr(transparent)] + pub struct TransportBlock(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for TransportBlock {} - /// [getRemoteDevice](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getRemoteDevice(java.lang.String)) - pub fn getRemoteDevice_String<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getRemoteDevice", .descriptor == "(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getRemoteDevice\0", "(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for TransportBlock { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/TransportBlock\0") } - - /// [getRemoteLeDevice](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getRemoteLeDevice(java.lang.String,%20int)) - pub fn getRemoteLeDevice<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>, arg1: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getRemoteLeDevice", .descriptor == "(Ljava/lang/String;I)Landroid/bluetooth/BluetoothDevice;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getRemoteLeDevice\0", "(Ljava/lang/String;I)Landroid/bluetooth/BluetoothDevice;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + } + unsafe impl ::java_spaghetti::AssignableTo for TransportBlock {} + unsafe impl ::java_spaghetti::AssignableTo for TransportBlock {} + impl ::std::ops::Deref for TransportBlock { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } } - - /// [getRemoteDevice](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getRemoteDevice(byte%5B%5D)) - pub fn getRemoteDevice_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getRemoteDevice", .descriptor == "([B)Landroid/bluetooth/BluetoothDevice;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getRemoteDevice\0", "([B)Landroid/bluetooth/BluetoothDevice;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + } + impl ::std::convert::AsRef for TransportBlock { + fn as_ref(&self) -> &super::super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::super::os::Parcelable) } } - - /// [getBluetoothLeAdvertiser](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getBluetoothLeAdvertiser()) - pub fn getBluetoothLeAdvertiser<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, le::BluetoothLeAdvertiser>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getBluetoothLeAdvertiser", .descriptor == "()Landroid/bluetooth/le/BluetoothLeAdvertiser;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getBluetoothLeAdvertiser\0", "()Landroid/bluetooth/le/BluetoothLeAdvertiser;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + impl TransportBlock { + /// [TransportBlock](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#TransportBlock(int,%20int,%20int,%20byte%5B%5D)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: i32, + arg1: i32, + arg2: i32, + arg3: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "", .descriptor == "(III[B)V" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + arg3.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportBlock\0", + "\0", + "(III[B)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } } - /// [getBluetoothLeScanner](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getBluetoothLeScanner()) - pub fn getBluetoothLeScanner<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, le::BluetoothLeScanner>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getBluetoothLeScanner", .descriptor == "()Landroid/bluetooth/le/BluetoothLeScanner;" + /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getBluetoothLeScanner\0", "()Landroid/bluetooth/le/BluetoothLeScanner;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportBlock\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [isEnabled](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isEnabled()) - pub fn isEnabled<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isEnabled", .descriptor == "()Z" + /// [equals](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" unsafe { - let __jni_args = []; + let __jni_args = [arg0.as_arg_jvalue()]; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isEnabled\0", "()Z\0"); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportBlock\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [getState](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getState()) - pub fn getState<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getState", .descriptor == "()I" + /// [getOrgId](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#getOrgId()) + pub fn getOrgId<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "getOrgId", .descriptor == "()I" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getState\0", "()I\0"); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportBlock\0", + "getOrgId\0", + "()I\0", + ); __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [enable](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#enable()) - #[deprecated] pub fn enable<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "enable", .descriptor == "()Z" + /// [getTdsFlags](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#getTdsFlags()) + pub fn getTdsFlags<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "getTdsFlags", .descriptor == "()I" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "enable\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportBlock\0", + "getTdsFlags\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [disable](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#disable()) - #[deprecated] pub fn disable<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "disable", .descriptor == "()Z" + /// [getTransportDataLength](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#getTransportDataLength()) + pub fn getTransportDataLength<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "getTransportDataLength", .descriptor == "()I" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "disable\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportBlock\0", + "getTransportDataLength\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [getAddress](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getAddress()) - pub fn getAddress<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getAddress", .descriptor == "()Ljava/lang/String;" + /// [getTransportData](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#getTransportData()) + pub fn getTransportData<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "getTransportData", .descriptor == "()[B" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getAddress\0", "()Ljava/lang/String;\0"); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportBlock\0", + "getTransportData\0", + "()[B\0", + ); __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [getName](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getName()) - pub fn getName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getName", .descriptor == "()Ljava/lang/String;" + /// [toByteArray](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#toByteArray()) + pub fn toByteArray<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "toByteArray", .descriptor == "()[B" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getName\0", "()Ljava/lang/String;\0"); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportBlock\0", + "toByteArray\0", + "()[B\0", + ); __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [setName](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#setName(java.lang.String)) - pub fn setName<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "setName", .descriptor == "(Ljava/lang/String;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "setName\0", "(Ljava/lang/String;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [getScanMode](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getScanMode()) - pub fn getScanMode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getScanMode", .descriptor == "()I" + /// [totalBytes](https://developer.android.com/reference/android/bluetooth/le/TransportBlock.html#totalBytes()) + pub fn totalBytes<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/TransportBlock", java.flags == PUBLIC, .name == "totalBytes", .descriptor == "()I" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getScanMode\0", "()I\0"); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportBlock\0", + "totalBytes\0", + "()I\0", + ); __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } + } - /// [startDiscovery](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#startDiscovery()) - pub fn startDiscovery<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "startDiscovery", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "startDiscovery\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } + /// pub final class [TransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html) + #[repr(transparent)] + pub struct TransportDiscoveryData(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for TransportDiscoveryData {} - /// [cancelDiscovery](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#cancelDiscovery()) - pub fn cancelDiscovery<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "cancelDiscovery", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "cancelDiscovery\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for TransportDiscoveryData { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/le/TransportDiscoveryData\0") } - - /// [isDiscovering](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isDiscovering()) - pub fn isDiscovering<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isDiscovering", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isDiscovering\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + } + unsafe impl ::java_spaghetti::AssignableTo for TransportDiscoveryData {} + unsafe impl ::java_spaghetti::AssignableTo for TransportDiscoveryData {} + impl ::std::ops::Deref for TransportDiscoveryData { + type Target = super::super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } } - - /// [isMultipleAdvertisementSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isMultipleAdvertisementSupported()) - pub fn isMultipleAdvertisementSupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isMultipleAdvertisementSupported", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isMultipleAdvertisementSupported\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + } + impl ::std::convert::AsRef for TransportDiscoveryData { + fn as_ref(&self) -> &super::super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::super::os::Parcelable) } } - - /// [isOffloadedFilteringSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isOffloadedFilteringSupported()) - pub fn isOffloadedFilteringSupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isOffloadedFilteringSupported", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isOffloadedFilteringSupported\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + impl TransportDiscoveryData { + /// [TransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#TransportDiscoveryData(int,%20java.util.List)) + pub fn new_int_List<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "", .descriptor == "(ILjava/util/List;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportDiscoveryData\0", + "\0", + "(ILjava/util/List;)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } } - /// [isOffloadedScanBatchingSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isOffloadedScanBatchingSupported()) - pub fn isOffloadedScanBatchingSupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isOffloadedScanBatchingSupported", .descriptor == "()Z" + /// [TransportDiscoveryData](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#TransportDiscoveryData(byte%5B%5D)) + pub fn new_byte_array<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "", .descriptor == "([B)V" unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isOffloadedScanBatchingSupported\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportDiscoveryData\0", + "\0", + "([B)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } } - /// [isLe2MPhySupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLe2MPhySupported()) - pub fn isLe2MPhySupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLe2MPhySupported", .descriptor == "()Z" + /// [describeContents](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isLe2MPhySupported\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportDiscoveryData\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [isLeCodedPhySupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeCodedPhySupported()) - pub fn isLeCodedPhySupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeCodedPhySupported", .descriptor == "()Z" + /// [equals](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + bool, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" unsafe { - let __jni_args = []; + let __jni_args = [arg0.as_arg_jvalue()]; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isLeCodedPhySupported\0", "()Z\0"); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportDiscoveryData\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [isLeExtendedAdvertisingSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeExtendedAdvertisingSupported()) - pub fn isLeExtendedAdvertisingSupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeExtendedAdvertisingSupported", .descriptor == "()Z" + /// [getTransportDataType](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#getTransportDataType()) + pub fn getTransportDataType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "getTransportDataType", .descriptor == "()I" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isLeExtendedAdvertisingSupported\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportDiscoveryData\0", + "getTransportDataType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [isLePeriodicAdvertisingSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLePeriodicAdvertisingSupported()) - pub fn isLePeriodicAdvertisingSupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLePeriodicAdvertisingSupported", .descriptor == "()Z" + /// [getTransportBlocks](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#getTransportBlocks()) + pub fn getTransportBlocks<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "getTransportBlocks", .descriptor == "()Ljava/util/List;" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isLePeriodicAdvertisingSupported\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportDiscoveryData\0", + "getTransportBlocks\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [isLeAudioSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeAudioSupported()) - pub fn isLeAudioSupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeAudioSupported", .descriptor == "()I" + /// [toByteArray](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#toByteArray()) + pub fn toByteArray<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "toByteArray", .descriptor == "()[B" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isLeAudioSupported\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportDiscoveryData\0", + "toByteArray\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } - /// [isLeAudioBroadcastSourceSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeAudioBroadcastSourceSupported()) - pub fn isLeAudioBroadcastSourceSupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeAudioBroadcastSourceSupported", .descriptor == "()I" + /// [totalBytes](https://developer.android.com/reference/android/bluetooth/le/TransportDiscoveryData.html#totalBytes()) + pub fn totalBytes<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/le/TransportDiscoveryData", java.flags == PUBLIC, .name == "totalBytes", .descriptor == "()I" unsafe { let __jni_args = []; let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isLeAudioBroadcastSourceSupported\0", "()I\0"); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/le/TransportDiscoveryData\0", + "totalBytes\0", + "()I\0", + ); __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } + } + } - /// [isLeAudioBroadcastAssistantSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeAudioBroadcastAssistantSupported()) - pub fn isLeAudioBroadcastAssistantSupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeAudioBroadcastAssistantSupported", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isLeAudioBroadcastAssistantSupported\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } + /// pub final class [BluetoothA2dp](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html) + #[repr(transparent)] + pub struct BluetoothA2dp(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothA2dp {} - /// [getLeMaximumAdvertisingDataLength](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getLeMaximumAdvertisingDataLength()) - pub fn getLeMaximumAdvertisingDataLength<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getLeMaximumAdvertisingDataLength", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getLeMaximumAdvertisingDataLength\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothA2dp { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothA2dp\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothA2dp {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothA2dp {} + impl ::std::ops::Deref for BluetoothA2dp { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothA2dp { + fn as_ref(&self) -> &BluetoothProfile { + unsafe { &*(self as *const Self as *const BluetoothProfile) } + } + } + impl BluetoothA2dp { + /// [finalize](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#finalize()) + pub fn finalize<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "finalize", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothA2dp\0", "finalize\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getMaxConnectedAudioDevices](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getMaxConnectedAudioDevices()) - pub fn getMaxConnectedAudioDevices<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getMaxConnectedAudioDevices", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getMaxConnectedAudioDevices\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#getConnectedDevices()) + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothA2dp\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getBondedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getBondedDevices()) - pub fn getBondedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::Set>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getBondedDevices", .descriptor == "()Ljava/util/Set;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getBondedDevices\0", "()Ljava/util/Set;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#getDevicesMatchingConnectionStates(int%5B%5D)) + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothA2dp\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getProfileConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getProfileConnectionState(int)) - pub fn getProfileConnectionState<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getProfileConnectionState", .descriptor == "(I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getProfileConnectionState\0", "(I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#getConnectionState(android.bluetooth.BluetoothDevice)) + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothA2dp\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [listenUsingRfcommWithServiceRecord](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingRfcommWithServiceRecord(java.lang.String,%20java.util.UUID)) - pub fn listenUsingRfcommWithServiceRecord<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothServerSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "listenUsingRfcommWithServiceRecord", .descriptor == "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "listenUsingRfcommWithServiceRecord\0", "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isA2dpPlaying](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#isA2dpPlaying(android.bluetooth.BluetoothDevice)) + pub fn isA2dpPlaying<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothA2dp", java.flags == PUBLIC, .name == "isA2dpPlaying", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothA2dp\0", + "isA2dpPlaying\0", + "(Landroid/bluetooth/BluetoothDevice;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [listenUsingInsecureRfcommWithServiceRecord](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingInsecureRfcommWithServiceRecord(java.lang.String,%20java.util.UUID)) - pub fn listenUsingInsecureRfcommWithServiceRecord<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothServerSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "listenUsingInsecureRfcommWithServiceRecord", .descriptor == "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "listenUsingInsecureRfcommWithServiceRecord\0", "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#ACTION_CONNECTION_STATE_CHANGED) + pub const ACTION_CONNECTION_STATE_CHANGED: &'static str = + "android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED"; + + /// public static final [ACTION_PLAYING_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#ACTION_PLAYING_STATE_CHANGED) + pub const ACTION_PLAYING_STATE_CHANGED: &'static str = + "android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED"; + + /// public static final [STATE_NOT_PLAYING](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#STATE_NOT_PLAYING) + pub const STATE_NOT_PLAYING: i32 = 11; + + /// public static final [STATE_PLAYING](https://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html#STATE_PLAYING) + pub const STATE_PLAYING: i32 = 10; + } + + /// pub final class [BluetoothAdapter](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html) + #[repr(transparent)] + pub struct BluetoothAdapter(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothAdapter {} + + unsafe impl ::java_spaghetti::JniType for BluetoothAdapter { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothAdapter\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothAdapter {} + impl ::std::ops::Deref for BluetoothAdapter { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothAdapter { + /// [getDefaultAdapter](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getDefaultAdapter()) + #[deprecated] + pub fn getDefaultAdapter<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothAdapter>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC | STATIC | SYNCRONIZED, .name == "getDefaultAdapter", .descriptor == "()Landroid/bluetooth/BluetoothAdapter;" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "android/bluetooth/BluetoothAdapter\0", + "getDefaultAdapter\0", + "()Landroid/bluetooth/BluetoothAdapter;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [closeProfileProxy](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#closeProfileProxy(int,%20android.bluetooth.BluetoothProfile)) - pub fn closeProfileProxy<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothProfile>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "closeProfileProxy", .descriptor == "(ILandroid/bluetooth/BluetoothProfile;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "closeProfileProxy\0", "(ILandroid/bluetooth/BluetoothProfile;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getRemoteDevice](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getRemoteDevice(java.lang.String)) + pub fn getRemoteDevice_String<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getRemoteDevice", .descriptor == "(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getRemoteDevice\0", + "(Ljava/lang/String;)Landroid/bluetooth/BluetoothDevice;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [checkBluetoothAddress](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#checkBluetoothAddress(java.lang.String)) - pub fn checkBluetoothAddress<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC | STATIC, .name == "checkBluetoothAddress", .descriptor == "(Ljava/lang/String;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/bluetooth/BluetoothAdapter\0", "checkBluetoothAddress\0", "(Ljava/lang/String;)Z\0"); - __jni_env.call_static_boolean_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [getRemoteLeDevice](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getRemoteLeDevice(java.lang.String,%20int)) + pub fn getRemoteLeDevice<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getRemoteLeDevice", .descriptor == "(Ljava/lang/String;I)Landroid/bluetooth/BluetoothDevice;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getRemoteLeDevice\0", + "(Ljava/lang/String;I)Landroid/bluetooth/BluetoothDevice;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [startLeScan](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback)) - #[deprecated] pub fn startLeScan_LeScanCallback<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothAdapter_LeScanCallback>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "startLeScan", .descriptor == "(Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "startLeScan\0", "(Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getRemoteDevice](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getRemoteDevice(byte%5B%5D)) + pub fn getRemoteDevice_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getRemoteDevice", .descriptor == "([B)Landroid/bluetooth/BluetoothDevice;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getRemoteDevice\0", + "([B)Landroid/bluetooth/BluetoothDevice;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [startLeScan](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#startLeScan(java.util.UUID%5B%5D,%20android.bluetooth.BluetoothAdapter.LeScanCallback)) - #[deprecated] pub fn startLeScan_UUID_array_LeScanCallback<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ObjectArray>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothAdapter_LeScanCallback>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "startLeScan", .descriptor == "([Ljava/util/UUID;Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "startLeScan\0", "([Ljava/util/UUID;Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBluetoothLeAdvertiser](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getBluetoothLeAdvertiser()) + pub fn getBluetoothLeAdvertiser<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, le::BluetoothLeAdvertiser>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getBluetoothLeAdvertiser", .descriptor == "()Landroid/bluetooth/le/BluetoothLeAdvertiser;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getBluetoothLeAdvertiser\0", + "()Landroid/bluetooth/le/BluetoothLeAdvertiser;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [stopLeScan](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#stopLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback)) - #[deprecated] pub fn stopLeScan<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothAdapter_LeScanCallback>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "stopLeScan", .descriptor == "(Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "stopLeScan\0", "(Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBluetoothLeScanner](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getBluetoothLeScanner()) + pub fn getBluetoothLeScanner<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, le::BluetoothLeScanner>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getBluetoothLeScanner", .descriptor == "()Landroid/bluetooth/le/BluetoothLeScanner;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getBluetoothLeScanner\0", + "()Landroid/bluetooth/le/BluetoothLeScanner;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [listenUsingL2capChannel](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingL2capChannel()) - pub fn listenUsingL2capChannel<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothServerSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "listenUsingL2capChannel", .descriptor == "()Landroid/bluetooth/BluetoothServerSocket;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "listenUsingL2capChannel\0", "()Landroid/bluetooth/BluetoothServerSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isEnabled](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isEnabled()) + pub fn isEnabled<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isEnabled", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "isEnabled\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [listenUsingInsecureL2capChannel](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingInsecureL2capChannel()) - pub fn listenUsingInsecureL2capChannel<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothServerSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "listenUsingInsecureL2capChannel", .descriptor == "()Landroid/bluetooth/BluetoothServerSocket;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "listenUsingInsecureL2capChannel\0", "()Landroid/bluetooth/BluetoothServerSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getState](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getState()) + pub fn getState<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getState", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "getState\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } + + /// [enable](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#enable()) + #[deprecated] + pub fn enable<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "enable", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "enable\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } + + /// [disable](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#disable()) + #[deprecated] + pub fn disable<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "disable", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothAdapter\0", "disable\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } + + /// [getAddress](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getAddress()) + pub fn getAddress<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getAddress", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getAddress\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } + + /// [getName](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getName()) + pub fn getName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_CONNECTION_STATE_CHANGED) - pub const ACTION_CONNECTION_STATE_CHANGED : &'static str = "android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED"; + /// [setName](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#setName(java.lang.String)) + pub fn setName<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "setName", .descriptor == "(Ljava/lang/String;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "setName\0", + "(Ljava/lang/String;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ACTION_DISCOVERY_FINISHED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_DISCOVERY_FINISHED) - pub const ACTION_DISCOVERY_FINISHED : &'static str = "android.bluetooth.adapter.action.DISCOVERY_FINISHED"; + /// [getScanMode](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getScanMode()) + pub fn getScanMode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getScanMode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getScanMode\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ACTION_DISCOVERY_STARTED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_DISCOVERY_STARTED) - pub const ACTION_DISCOVERY_STARTED : &'static str = "android.bluetooth.adapter.action.DISCOVERY_STARTED"; + /// [startDiscovery](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#startDiscovery()) + pub fn startDiscovery<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "startDiscovery", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "startDiscovery\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ACTION_LOCAL_NAME_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_LOCAL_NAME_CHANGED) - pub const ACTION_LOCAL_NAME_CHANGED : &'static str = "android.bluetooth.adapter.action.LOCAL_NAME_CHANGED"; + /// [cancelDiscovery](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#cancelDiscovery()) + pub fn cancelDiscovery<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "cancelDiscovery", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "cancelDiscovery\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ACTION_REQUEST_DISCOVERABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_REQUEST_DISCOVERABLE) - pub const ACTION_REQUEST_DISCOVERABLE : &'static str = "android.bluetooth.adapter.action.REQUEST_DISCOVERABLE"; + /// [isDiscovering](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isDiscovering()) + pub fn isDiscovering<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isDiscovering", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isDiscovering\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ACTION_REQUEST_ENABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_REQUEST_ENABLE) - pub const ACTION_REQUEST_ENABLE : &'static str = "android.bluetooth.adapter.action.REQUEST_ENABLE"; + /// [isMultipleAdvertisementSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isMultipleAdvertisementSupported()) + pub fn isMultipleAdvertisementSupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isMultipleAdvertisementSupported", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isMultipleAdvertisementSupported\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ACTION_SCAN_MODE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_SCAN_MODE_CHANGED) - pub const ACTION_SCAN_MODE_CHANGED : &'static str = "android.bluetooth.adapter.action.SCAN_MODE_CHANGED"; + /// [isOffloadedFilteringSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isOffloadedFilteringSupported()) + pub fn isOffloadedFilteringSupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isOffloadedFilteringSupported", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isOffloadedFilteringSupported\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ACTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_STATE_CHANGED) - pub const ACTION_STATE_CHANGED : &'static str = "android.bluetooth.adapter.action.STATE_CHANGED"; + /// [isOffloadedScanBatchingSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isOffloadedScanBatchingSupported()) + pub fn isOffloadedScanBatchingSupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isOffloadedScanBatchingSupported", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isOffloadedScanBatchingSupported\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ERROR](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ERROR) - pub const ERROR : i32 = -2147483648; + /// [isLe2MPhySupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLe2MPhySupported()) + pub fn isLe2MPhySupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLe2MPhySupported", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isLe2MPhySupported\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [EXTRA_CONNECTION_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_CONNECTION_STATE) - pub const EXTRA_CONNECTION_STATE : &'static str = "android.bluetooth.adapter.extra.CONNECTION_STATE"; + /// [isLeCodedPhySupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeCodedPhySupported()) + pub fn isLeCodedPhySupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeCodedPhySupported", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isLeCodedPhySupported\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [EXTRA_DISCOVERABLE_DURATION](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_DISCOVERABLE_DURATION) - pub const EXTRA_DISCOVERABLE_DURATION : &'static str = "android.bluetooth.adapter.extra.DISCOVERABLE_DURATION"; + /// [isLeExtendedAdvertisingSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeExtendedAdvertisingSupported()) + pub fn isLeExtendedAdvertisingSupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeExtendedAdvertisingSupported", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isLeExtendedAdvertisingSupported\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [EXTRA_LOCAL_NAME](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_LOCAL_NAME) - pub const EXTRA_LOCAL_NAME : &'static str = "android.bluetooth.adapter.extra.LOCAL_NAME"; + /// [isLePeriodicAdvertisingSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLePeriodicAdvertisingSupported()) + pub fn isLePeriodicAdvertisingSupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLePeriodicAdvertisingSupported", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isLePeriodicAdvertisingSupported\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [EXTRA_PREVIOUS_CONNECTION_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_PREVIOUS_CONNECTION_STATE) - pub const EXTRA_PREVIOUS_CONNECTION_STATE : &'static str = "android.bluetooth.adapter.extra.PREVIOUS_CONNECTION_STATE"; + /// [isLeAudioSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeAudioSupported()) + pub fn isLeAudioSupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeAudioSupported", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isLeAudioSupported\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [EXTRA_PREVIOUS_SCAN_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_PREVIOUS_SCAN_MODE) - pub const EXTRA_PREVIOUS_SCAN_MODE : &'static str = "android.bluetooth.adapter.extra.PREVIOUS_SCAN_MODE"; + /// [isLeAudioBroadcastSourceSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeAudioBroadcastSourceSupported()) + pub fn isLeAudioBroadcastSourceSupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeAudioBroadcastSourceSupported", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isLeAudioBroadcastSourceSupported\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [EXTRA_PREVIOUS_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_PREVIOUS_STATE) - pub const EXTRA_PREVIOUS_STATE : &'static str = "android.bluetooth.adapter.extra.PREVIOUS_STATE"; + /// [isLeAudioBroadcastAssistantSupported](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isLeAudioBroadcastAssistantSupported()) + pub fn isLeAudioBroadcastAssistantSupported<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "isLeAudioBroadcastAssistantSupported", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "isLeAudioBroadcastAssistantSupported\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [EXTRA_SCAN_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_SCAN_MODE) - pub const EXTRA_SCAN_MODE : &'static str = "android.bluetooth.adapter.extra.SCAN_MODE"; + /// [getLeMaximumAdvertisingDataLength](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getLeMaximumAdvertisingDataLength()) + pub fn getLeMaximumAdvertisingDataLength<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getLeMaximumAdvertisingDataLength", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getLeMaximumAdvertisingDataLength\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [EXTRA_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_STATE) - pub const EXTRA_STATE : &'static str = "android.bluetooth.adapter.extra.STATE"; + /// [getMaxConnectedAudioDevices](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getMaxConnectedAudioDevices()) + pub fn getMaxConnectedAudioDevices<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getMaxConnectedAudioDevices", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getMaxConnectedAudioDevices\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [SCAN_MODE_CONNECTABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#SCAN_MODE_CONNECTABLE) - pub const SCAN_MODE_CONNECTABLE : i32 = 21; + /// [getBondedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getBondedDevices()) + pub fn getBondedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::Set>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getBondedDevices", .descriptor == "()Ljava/util/Set;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getBondedDevices\0", + "()Ljava/util/Set;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [SCAN_MODE_CONNECTABLE_DISCOVERABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#SCAN_MODE_CONNECTABLE_DISCOVERABLE) - pub const SCAN_MODE_CONNECTABLE_DISCOVERABLE : i32 = 23; + /// [getProfileConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getProfileConnectionState(int)) + pub fn getProfileConnectionState<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "getProfileConnectionState", .descriptor == "(I)I" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "getProfileConnectionState\0", + "(I)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [SCAN_MODE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#SCAN_MODE_NONE) - pub const SCAN_MODE_NONE : i32 = 20; + /// [listenUsingRfcommWithServiceRecord](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingRfcommWithServiceRecord(java.lang.String,%20java.util.UUID)) + pub fn listenUsingRfcommWithServiceRecord<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothServerSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "listenUsingRfcommWithServiceRecord", .descriptor == "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "listenUsingRfcommWithServiceRecord\0", + "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [STATE_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_CONNECTED) - pub const STATE_CONNECTED : i32 = 2; + /// [listenUsingInsecureRfcommWithServiceRecord](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingInsecureRfcommWithServiceRecord(java.lang.String,%20java.util.UUID)) + pub fn listenUsingInsecureRfcommWithServiceRecord<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothServerSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "listenUsingInsecureRfcommWithServiceRecord", .descriptor == "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "listenUsingInsecureRfcommWithServiceRecord\0", + "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [STATE_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_CONNECTING) - pub const STATE_CONNECTING : i32 = 1; + /// [closeProfileProxy](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#closeProfileProxy(int,%20android.bluetooth.BluetoothProfile)) + pub fn closeProfileProxy<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "closeProfileProxy", .descriptor == "(ILandroid/bluetooth/BluetoothProfile;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "closeProfileProxy\0", + "(ILandroid/bluetooth/BluetoothProfile;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [STATE_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_DISCONNECTED) - pub const STATE_DISCONNECTED : i32 = 0; + /// [checkBluetoothAddress](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#checkBluetoothAddress(java.lang.String)) + pub fn checkBluetoothAddress<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC | STATIC, .name == "checkBluetoothAddress", .descriptor == "(Ljava/lang/String;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "android/bluetooth/BluetoothAdapter\0", + "checkBluetoothAddress\0", + "(Ljava/lang/String;)Z\0", + ); + __jni_env.call_static_boolean_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [STATE_DISCONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_DISCONNECTING) - pub const STATE_DISCONNECTING : i32 = 3; + /// [startLeScan](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback)) + #[deprecated] + pub fn startLeScan_LeScanCallback<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "startLeScan", .descriptor == "(Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "startLeScan\0", + "(Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [STATE_OFF](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_OFF) - pub const STATE_OFF : i32 = 10; + /// [startLeScan](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#startLeScan(java.util.UUID%5B%5D,%20android.bluetooth.BluetoothAdapter.LeScanCallback)) + #[deprecated] + pub fn startLeScan_UUID_array_LeScanCallback<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg< + ::java_spaghetti::ObjectArray, + >, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "startLeScan", .descriptor == "([Ljava/util/UUID;Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "startLeScan\0", + "([Ljava/util/UUID;Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [STATE_ON](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_ON) - pub const STATE_ON : i32 = 12; + /// [stopLeScan](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#stopLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback)) + #[deprecated] + pub fn stopLeScan<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "stopLeScan", .descriptor == "(Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "stopLeScan\0", + "(Landroid/bluetooth/BluetoothAdapter$LeScanCallback;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [STATE_TURNING_OFF](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_TURNING_OFF) - pub const STATE_TURNING_OFF : i32 = 13; + /// [listenUsingL2capChannel](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingL2capChannel()) + pub fn listenUsingL2capChannel<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothServerSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "listenUsingL2capChannel", .descriptor == "()Landroid/bluetooth/BluetoothServerSocket;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "listenUsingL2capChannel\0", + "()Landroid/bluetooth/BluetoothServerSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [STATE_TURNING_ON](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_TURNING_ON) - pub const STATE_TURNING_ON : i32 = 11; + /// [listenUsingInsecureL2capChannel](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingInsecureL2capChannel()) + pub fn listenUsingInsecureL2capChannel<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothServerSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothAdapter", java.flags == PUBLIC, .name == "listenUsingInsecureL2capChannel", .descriptor == "()Landroid/bluetooth/BluetoothServerSocket;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter\0", + "listenUsingInsecureL2capChannel\0", + "()Landroid/bluetooth/BluetoothServerSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } } + + /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_CONNECTION_STATE_CHANGED) + pub const ACTION_CONNECTION_STATE_CHANGED: &'static str = + "android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED"; + + /// public static final [ACTION_DISCOVERY_FINISHED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_DISCOVERY_FINISHED) + pub const ACTION_DISCOVERY_FINISHED: &'static str = "android.bluetooth.adapter.action.DISCOVERY_FINISHED"; + + /// public static final [ACTION_DISCOVERY_STARTED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_DISCOVERY_STARTED) + pub const ACTION_DISCOVERY_STARTED: &'static str = "android.bluetooth.adapter.action.DISCOVERY_STARTED"; + + /// public static final [ACTION_LOCAL_NAME_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_LOCAL_NAME_CHANGED) + pub const ACTION_LOCAL_NAME_CHANGED: &'static str = "android.bluetooth.adapter.action.LOCAL_NAME_CHANGED"; + + /// public static final [ACTION_REQUEST_DISCOVERABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_REQUEST_DISCOVERABLE) + pub const ACTION_REQUEST_DISCOVERABLE: &'static str = + "android.bluetooth.adapter.action.REQUEST_DISCOVERABLE"; + + /// public static final [ACTION_REQUEST_ENABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_REQUEST_ENABLE) + pub const ACTION_REQUEST_ENABLE: &'static str = "android.bluetooth.adapter.action.REQUEST_ENABLE"; + + /// public static final [ACTION_SCAN_MODE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_SCAN_MODE_CHANGED) + pub const ACTION_SCAN_MODE_CHANGED: &'static str = "android.bluetooth.adapter.action.SCAN_MODE_CHANGED"; + + /// public static final [ACTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_STATE_CHANGED) + pub const ACTION_STATE_CHANGED: &'static str = "android.bluetooth.adapter.action.STATE_CHANGED"; + + /// public static final [ERROR](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ERROR) + pub const ERROR: i32 = -2147483648; + + /// public static final [EXTRA_CONNECTION_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_CONNECTION_STATE) + pub const EXTRA_CONNECTION_STATE: &'static str = "android.bluetooth.adapter.extra.CONNECTION_STATE"; + + /// public static final [EXTRA_DISCOVERABLE_DURATION](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_DISCOVERABLE_DURATION) + pub const EXTRA_DISCOVERABLE_DURATION: &'static str = + "android.bluetooth.adapter.extra.DISCOVERABLE_DURATION"; + + /// public static final [EXTRA_LOCAL_NAME](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_LOCAL_NAME) + pub const EXTRA_LOCAL_NAME: &'static str = "android.bluetooth.adapter.extra.LOCAL_NAME"; + + /// public static final [EXTRA_PREVIOUS_CONNECTION_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_PREVIOUS_CONNECTION_STATE) + pub const EXTRA_PREVIOUS_CONNECTION_STATE: &'static str = + "android.bluetooth.adapter.extra.PREVIOUS_CONNECTION_STATE"; + + /// public static final [EXTRA_PREVIOUS_SCAN_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_PREVIOUS_SCAN_MODE) + pub const EXTRA_PREVIOUS_SCAN_MODE: &'static str = "android.bluetooth.adapter.extra.PREVIOUS_SCAN_MODE"; + + /// public static final [EXTRA_PREVIOUS_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_PREVIOUS_STATE) + pub const EXTRA_PREVIOUS_STATE: &'static str = "android.bluetooth.adapter.extra.PREVIOUS_STATE"; + + /// public static final [EXTRA_SCAN_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_SCAN_MODE) + pub const EXTRA_SCAN_MODE: &'static str = "android.bluetooth.adapter.extra.SCAN_MODE"; + + /// public static final [EXTRA_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#EXTRA_STATE) + pub const EXTRA_STATE: &'static str = "android.bluetooth.adapter.extra.STATE"; + + /// public static final [SCAN_MODE_CONNECTABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#SCAN_MODE_CONNECTABLE) + pub const SCAN_MODE_CONNECTABLE: i32 = 21; + + /// public static final [SCAN_MODE_CONNECTABLE_DISCOVERABLE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#SCAN_MODE_CONNECTABLE_DISCOVERABLE) + pub const SCAN_MODE_CONNECTABLE_DISCOVERABLE: i32 = 23; + + /// public static final [SCAN_MODE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#SCAN_MODE_NONE) + pub const SCAN_MODE_NONE: i32 = 20; + + /// public static final [STATE_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_CONNECTED) + pub const STATE_CONNECTED: i32 = 2; + + /// public static final [STATE_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_CONNECTING) + pub const STATE_CONNECTING: i32 = 1; + + /// public static final [STATE_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_DISCONNECTED) + pub const STATE_DISCONNECTED: i32 = 0; + + /// public static final [STATE_DISCONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_DISCONNECTING) + pub const STATE_DISCONNECTING: i32 = 3; + + /// public static final [STATE_OFF](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_OFF) + pub const STATE_OFF: i32 = 10; + + /// public static final [STATE_ON](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_ON) + pub const STATE_ON: i32 = 12; + + /// public static final [STATE_TURNING_OFF](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_TURNING_OFF) + pub const STATE_TURNING_OFF: i32 = 13; + + /// public static final [STATE_TURNING_ON](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#STATE_TURNING_ON) + pub const STATE_TURNING_ON: i32 = 11; } - ::java_spaghetti::class! { - /// public interface [BluetoothAdapter.LeScanCallback](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.LeScanCallback.html) - public interface BluetoothAdapter_LeScanCallback ("android/bluetooth/BluetoothAdapter$LeScanCallback\0") extends super::super::java::lang::Object { + /// pub interface [BluetoothAdapter.LeScanCallback](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.LeScanCallback.html) + #[repr(transparent)] + pub struct BluetoothAdapter_LeScanCallback(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothAdapter_LeScanCallback {} - /// [onLeScan](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.LeScanCallback.html#onLeScan(android.bluetooth.BluetoothDevice,%20int,%20byte%5B%5D)) - pub fn onLeScan<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothAdapter$LeScanCallback", java.flags == PUBLIC | ABSTRACT, .name == "onLeScan", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I[B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothAdapter$LeScanCallback\0", "onLeScan\0", "(Landroid/bluetooth/BluetoothDevice;I[B)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothAdapter_LeScanCallback { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothAdapter$LeScanCallback\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothAdapter_LeScanCallback {} + impl ::std::ops::Deref for BluetoothAdapter_LeScanCallback { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothAdapter_LeScanCallback { + /// [onLeScan](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.LeScanCallback.html#onLeScan(android.bluetooth.BluetoothDevice,%20int,%20byte%5B%5D)) + pub fn onLeScan<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothAdapter$LeScanCallback", java.flags == PUBLIC | ABSTRACT, .name == "onLeScan", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I[B)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + arg2.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothAdapter$LeScanCallback\0", + "onLeScan\0", + "(Landroid/bluetooth/BluetoothDevice;I[B)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public class [BluetoothAssignedNumbers](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html) - public class BluetoothAssignedNumbers ("android/bluetooth/BluetoothAssignedNumbers\0") extends super::super::java::lang::Object { + /// pub class [BluetoothAssignedNumbers](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html) + #[repr(transparent)] + pub struct BluetoothAssignedNumbers(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothAssignedNumbers {} - /// public static final [AAMP_OF_AMERICA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AAMP_OF_AMERICA) - pub const AAMP_OF_AMERICA : i32 = 190; + unsafe impl ::java_spaghetti::JniType for BluetoothAssignedNumbers { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothAssignedNumbers\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothAssignedNumbers {} + impl ::std::ops::Deref for BluetoothAssignedNumbers { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothAssignedNumbers { + /// public static final [AAMP_OF_AMERICA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AAMP_OF_AMERICA) + pub const AAMP_OF_AMERICA: i32 = 190; - /// public static final [ACCEL_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ACCEL_SEMICONDUCTOR) - pub const ACCEL_SEMICONDUCTOR : i32 = 74; + /// public static final [ACCEL_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ACCEL_SEMICONDUCTOR) + pub const ACCEL_SEMICONDUCTOR: i32 = 74; - /// public static final [ACE_SENSOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ACE_SENSOR) - pub const ACE_SENSOR : i32 = 188; + /// public static final [ACE_SENSOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ACE_SENSOR) + pub const ACE_SENSOR: i32 = 188; - /// public static final [ADIDAS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ADIDAS) - pub const ADIDAS : i32 = 195; + /// public static final [ADIDAS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ADIDAS) + pub const ADIDAS: i32 = 195; - /// public static final [ADVANCED_PANMOBIL_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ADVANCED_PANMOBIL_SYSTEMS) - pub const ADVANCED_PANMOBIL_SYSTEMS : i32 = 145; + /// public static final [ADVANCED_PANMOBIL_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ADVANCED_PANMOBIL_SYSTEMS) + pub const ADVANCED_PANMOBIL_SYSTEMS: i32 = 145; - /// public static final [AIROHA_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AIROHA_TECHNOLOGY) - pub const AIROHA_TECHNOLOGY : i32 = 148; + /// public static final [AIROHA_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AIROHA_TECHNOLOGY) + pub const AIROHA_TECHNOLOGY: i32 = 148; - /// public static final [ALCATEL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ALCATEL) - pub const ALCATEL : i32 = 36; + /// public static final [ALCATEL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ALCATEL) + pub const ALCATEL: i32 = 36; - /// public static final [ALPWISE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ALPWISE) - pub const ALPWISE : i32 = 154; + /// public static final [ALPWISE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ALPWISE) + pub const ALPWISE: i32 = 154; - /// public static final [AMICCOM_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AMICCOM_ELECTRONICS) - pub const AMICCOM_ELECTRONICS : i32 = 192; + /// public static final [AMICCOM_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AMICCOM_ELECTRONICS) + pub const AMICCOM_ELECTRONICS: i32 = 192; - /// public static final [APLIX](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#APLIX) - pub const APLIX : i32 = 189; + /// public static final [APLIX](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#APLIX) + pub const APLIX: i32 = 189; - /// public static final [APPLE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#APPLE) - pub const APPLE : i32 = 76; + /// public static final [APPLE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#APPLE) + pub const APPLE: i32 = 76; - /// public static final [APT_LICENSING](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#APT_LICENSING) - pub const APT_LICENSING : i32 = 79; + /// public static final [APT_LICENSING](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#APT_LICENSING) + pub const APT_LICENSING: i32 = 79; - /// public static final [ARCHOS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ARCHOS) - pub const ARCHOS : i32 = 207; + /// public static final [ARCHOS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ARCHOS) + pub const ARCHOS: i32 = 207; - /// public static final [ARP_DEVICES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ARP_DEVICES) - pub const ARP_DEVICES : i32 = 168; + /// public static final [ARP_DEVICES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ARP_DEVICES) + pub const ARP_DEVICES: i32 = 168; - /// public static final [ATHEROS_COMMUNICATIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ATHEROS_COMMUNICATIONS) - pub const ATHEROS_COMMUNICATIONS : i32 = 69; + /// public static final [ATHEROS_COMMUNICATIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ATHEROS_COMMUNICATIONS) + pub const ATHEROS_COMMUNICATIONS: i32 = 69; - /// public static final [ATMEL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ATMEL) - pub const ATMEL : i32 = 19; + /// public static final [ATMEL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ATMEL) + pub const ATMEL: i32 = 19; - /// public static final [AUSTCO_COMMUNICATION_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AUSTCO_COMMUNICATION_SYSTEMS) - pub const AUSTCO_COMMUNICATION_SYSTEMS : i32 = 213; + /// public static final [AUSTCO_COMMUNICATION_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AUSTCO_COMMUNICATION_SYSTEMS) + pub const AUSTCO_COMMUNICATION_SYSTEMS: i32 = 213; - /// public static final [AUTONET_MOBILE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AUTONET_MOBILE) - pub const AUTONET_MOBILE : i32 = 127; + /// public static final [AUTONET_MOBILE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AUTONET_MOBILE) + pub const AUTONET_MOBILE: i32 = 127; - /// public static final [AVAGO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AVAGO) - pub const AVAGO : i32 = 78; + /// public static final [AVAGO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AVAGO) + pub const AVAGO: i32 = 78; - /// public static final [AVM_BERLIN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AVM_BERLIN) - pub const AVM_BERLIN : i32 = 31; + /// public static final [AVM_BERLIN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#AVM_BERLIN) + pub const AVM_BERLIN: i32 = 31; - /// public static final [A_AND_D_ENGINEERING](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#A_AND_D_ENGINEERING) - pub const A_AND_D_ENGINEERING : i32 = 105; + /// public static final [A_AND_D_ENGINEERING](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#A_AND_D_ENGINEERING) + pub const A_AND_D_ENGINEERING: i32 = 105; - /// public static final [A_AND_R_CAMBRIDGE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#A_AND_R_CAMBRIDGE) - pub const A_AND_R_CAMBRIDGE : i32 = 124; + /// public static final [A_AND_R_CAMBRIDGE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#A_AND_R_CAMBRIDGE) + pub const A_AND_R_CAMBRIDGE: i32 = 124; - /// public static final [BANDSPEED](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BANDSPEED) - pub const BANDSPEED : i32 = 32; + /// public static final [BANDSPEED](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BANDSPEED) + pub const BANDSPEED: i32 = 32; - /// public static final [BAND_XI_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BAND_XI_INTERNATIONAL) - pub const BAND_XI_INTERNATIONAL : i32 = 100; + /// public static final [BAND_XI_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BAND_XI_INTERNATIONAL) + pub const BAND_XI_INTERNATIONAL: i32 = 100; - /// public static final [BDE_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BDE_TECHNOLOGY) - pub const BDE_TECHNOLOGY : i32 = 180; + /// public static final [BDE_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BDE_TECHNOLOGY) + pub const BDE_TECHNOLOGY: i32 = 180; - /// public static final [BEATS_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BEATS_ELECTRONICS) - pub const BEATS_ELECTRONICS : i32 = 204; + /// public static final [BEATS_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BEATS_ELECTRONICS) + pub const BEATS_ELECTRONICS: i32 = 204; - /// public static final [BEAUTIFUL_ENTERPRISE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BEAUTIFUL_ENTERPRISE) - pub const BEAUTIFUL_ENTERPRISE : i32 = 108; + /// public static final [BEAUTIFUL_ENTERPRISE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BEAUTIFUL_ENTERPRISE) + pub const BEAUTIFUL_ENTERPRISE: i32 = 108; - /// public static final [BEKEY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BEKEY) - pub const BEKEY : i32 = 178; + /// public static final [BEKEY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BEKEY) + pub const BEKEY: i32 = 178; - /// public static final [BELKIN_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BELKIN_INTERNATIONAL) - pub const BELKIN_INTERNATIONAL : i32 = 92; + /// public static final [BELKIN_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BELKIN_INTERNATIONAL) + pub const BELKIN_INTERNATIONAL: i32 = 92; - /// public static final [BINAURIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BINAURIC) - pub const BINAURIC : i32 = 203; + /// public static final [BINAURIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BINAURIC) + pub const BINAURIC: i32 = 203; - /// public static final [BIOSENTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BIOSENTRONICS) - pub const BIOSENTRONICS : i32 = 219; + /// public static final [BIOSENTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BIOSENTRONICS) + pub const BIOSENTRONICS: i32 = 219; - /// public static final [BLUEGIGA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BLUEGIGA) - pub const BLUEGIGA : i32 = 71; + /// public static final [BLUEGIGA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BLUEGIGA) + pub const BLUEGIGA: i32 = 71; - /// public static final [BLUERADIOS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BLUERADIOS) - pub const BLUERADIOS : i32 = 133; + /// public static final [BLUERADIOS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BLUERADIOS) + pub const BLUERADIOS: i32 = 133; - /// public static final [BLUETOOTH_SIG](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BLUETOOTH_SIG) - pub const BLUETOOTH_SIG : i32 = 63; + /// public static final [BLUETOOTH_SIG](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BLUETOOTH_SIG) + pub const BLUETOOTH_SIG: i32 = 63; - /// public static final [BLUETREK_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BLUETREK_TECHNOLOGIES) - pub const BLUETREK_TECHNOLOGIES : i32 = 151; + /// public static final [BLUETREK_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BLUETREK_TECHNOLOGIES) + pub const BLUETREK_TECHNOLOGIES: i32 = 151; - /// public static final [BOSE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BOSE) - pub const BOSE : i32 = 158; + /// public static final [BOSE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BOSE) + pub const BOSE: i32 = 158; - /// public static final [BRIARTEK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BRIARTEK) - pub const BRIARTEK : i32 = 109; + /// public static final [BRIARTEK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BRIARTEK) + pub const BRIARTEK: i32 = 109; - /// public static final [BROADCOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BROADCOM) - pub const BROADCOM : i32 = 15; + /// public static final [BROADCOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#BROADCOM) + pub const BROADCOM: i32 = 15; - /// public static final [CAEN_RFID](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CAEN_RFID) - pub const CAEN_RFID : i32 = 170; + /// public static final [CAEN_RFID](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CAEN_RFID) + pub const CAEN_RFID: i32 = 170; - /// public static final [CAMBRIDGE_SILICON_RADIO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CAMBRIDGE_SILICON_RADIO) - pub const CAMBRIDGE_SILICON_RADIO : i32 = 10; + /// public static final [CAMBRIDGE_SILICON_RADIO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CAMBRIDGE_SILICON_RADIO) + pub const CAMBRIDGE_SILICON_RADIO: i32 = 10; - /// public static final [CATC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CATC) - pub const CATC : i32 = 52; + /// public static final [CATC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CATC) + pub const CATC: i32 = 52; - /// public static final [CINETIX](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CINETIX) - pub const CINETIX : i32 = 175; + /// public static final [CINETIX](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CINETIX) + pub const CINETIX: i32 = 175; - /// public static final [CLARINOX_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CLARINOX_TECHNOLOGIES) - pub const CLARINOX_TECHNOLOGIES : i32 = 179; + /// public static final [CLARINOX_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CLARINOX_TECHNOLOGIES) + pub const CLARINOX_TECHNOLOGIES: i32 = 179; - /// public static final [COLORFY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#COLORFY) - pub const COLORFY : i32 = 156; + /// public static final [COLORFY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#COLORFY) + pub const COLORFY: i32 = 156; - /// public static final [COMMIL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#COMMIL) - pub const COMMIL : i32 = 51; + /// public static final [COMMIL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#COMMIL) + pub const COMMIL: i32 = 51; - /// public static final [CONEXANT_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CONEXANT_SYSTEMS) - pub const CONEXANT_SYSTEMS : i32 = 28; + /// public static final [CONEXANT_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CONEXANT_SYSTEMS) + pub const CONEXANT_SYSTEMS: i32 = 28; - /// public static final [CONNECTBLUE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CONNECTBLUE) - pub const CONNECTBLUE : i32 = 113; + /// public static final [CONNECTBLUE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CONNECTBLUE) + pub const CONNECTBLUE: i32 = 113; - /// public static final [CONTINENTAL_AUTOMOTIVE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CONTINENTAL_AUTOMOTIVE) - pub const CONTINENTAL_AUTOMOTIVE : i32 = 75; + /// public static final [CONTINENTAL_AUTOMOTIVE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CONTINENTAL_AUTOMOTIVE) + pub const CONTINENTAL_AUTOMOTIVE: i32 = 75; - /// public static final [CONWISE_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CONWISE_TECHNOLOGY) - pub const CONWISE_TECHNOLOGY : i32 = 66; + /// public static final [CONWISE_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CONWISE_TECHNOLOGY) + pub const CONWISE_TECHNOLOGY: i32 = 66; - /// public static final [CREATIVE_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CREATIVE_TECHNOLOGY) - pub const CREATIVE_TECHNOLOGY : i32 = 118; + /// public static final [CREATIVE_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#CREATIVE_TECHNOLOGY) + pub const CREATIVE_TECHNOLOGY: i32 = 118; - /// public static final [C_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#C_TECHNOLOGIES) - pub const C_TECHNOLOGIES : i32 = 38; + /// public static final [C_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#C_TECHNOLOGIES) + pub const C_TECHNOLOGIES: i32 = 38; - /// public static final [DANLERS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DANLERS) - pub const DANLERS : i32 = 225; + /// public static final [DANLERS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DANLERS) + pub const DANLERS: i32 = 225; - /// public static final [DELORME_PUBLISHING_COMPANY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DELORME_PUBLISHING_COMPANY) - pub const DELORME_PUBLISHING_COMPANY : i32 = 128; + /// public static final [DELORME_PUBLISHING_COMPANY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DELORME_PUBLISHING_COMPANY) + pub const DELORME_PUBLISHING_COMPANY: i32 = 128; - /// public static final [DEXCOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DEXCOM) - pub const DEXCOM : i32 = 208; + /// public static final [DEXCOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DEXCOM) + pub const DEXCOM: i32 = 208; - /// public static final [DIALOG_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DIALOG_SEMICONDUCTOR) - pub const DIALOG_SEMICONDUCTOR : i32 = 210; + /// public static final [DIALOG_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DIALOG_SEMICONDUCTOR) + pub const DIALOG_SEMICONDUCTOR: i32 = 210; - /// public static final [DIGIANSWER](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DIGIANSWER) - pub const DIGIANSWER : i32 = 12; + /// public static final [DIGIANSWER](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#DIGIANSWER) + pub const DIGIANSWER: i32 = 12; - /// public static final [ECLIPSE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ECLIPSE) - pub const ECLIPSE : i32 = 53; + /// public static final [ECLIPSE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ECLIPSE) + pub const ECLIPSE: i32 = 53; - /// public static final [ECOTEST](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ECOTEST) - pub const ECOTEST : i32 = 136; + /// public static final [ECOTEST](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ECOTEST) + pub const ECOTEST: i32 = 136; - /// public static final [ELGATO_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ELGATO_SYSTEMS) - pub const ELGATO_SYSTEMS : i32 = 206; + /// public static final [ELGATO_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ELGATO_SYSTEMS) + pub const ELGATO_SYSTEMS: i32 = 206; - /// public static final [EM_MICROELECTRONIC_MARIN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#EM_MICROELECTRONIC_MARIN) - pub const EM_MICROELECTRONIC_MARIN : i32 = 90; + /// public static final [EM_MICROELECTRONIC_MARIN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#EM_MICROELECTRONIC_MARIN) + pub const EM_MICROELECTRONIC_MARIN: i32 = 90; - /// public static final [EQUINOX_AG](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#EQUINOX_AG) - pub const EQUINOX_AG : i32 = 134; + /// public static final [EQUINOX_AG](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#EQUINOX_AG) + pub const EQUINOX_AG: i32 = 134; - /// public static final [ERICSSON_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ERICSSON_TECHNOLOGY) - pub const ERICSSON_TECHNOLOGY : i32 = 0; + /// public static final [ERICSSON_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ERICSSON_TECHNOLOGY) + pub const ERICSSON_TECHNOLOGY: i32 = 0; - /// public static final [EVLUMA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#EVLUMA) - pub const EVLUMA : i32 = 201; + /// public static final [EVLUMA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#EVLUMA) + pub const EVLUMA: i32 = 201; - /// public static final [FREE2MOVE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#FREE2MOVE) - pub const FREE2MOVE : i32 = 83; + /// public static final [FREE2MOVE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#FREE2MOVE) + pub const FREE2MOVE: i32 = 83; - /// public static final [FUNAI_ELECTRIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#FUNAI_ELECTRIC) - pub const FUNAI_ELECTRIC : i32 = 144; + /// public static final [FUNAI_ELECTRIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#FUNAI_ELECTRIC) + pub const FUNAI_ELECTRIC: i32 = 144; - /// public static final [GARMIN_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GARMIN_INTERNATIONAL) - pub const GARMIN_INTERNATIONAL : i32 = 135; + /// public static final [GARMIN_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GARMIN_INTERNATIONAL) + pub const GARMIN_INTERNATIONAL: i32 = 135; - /// public static final [GCT_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GCT_SEMICONDUCTOR) - pub const GCT_SEMICONDUCTOR : i32 = 45; + /// public static final [GCT_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GCT_SEMICONDUCTOR) + pub const GCT_SEMICONDUCTOR: i32 = 45; - /// public static final [GELO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GELO) - pub const GELO : i32 = 200; + /// public static final [GELO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GELO) + pub const GELO: i32 = 200; - /// public static final [GENEQ](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GENEQ) - pub const GENEQ : i32 = 194; + /// public static final [GENEQ](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GENEQ) + pub const GENEQ: i32 = 194; - /// public static final [GENERAL_MOTORS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GENERAL_MOTORS) - pub const GENERAL_MOTORS : i32 = 104; + /// public static final [GENERAL_MOTORS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GENERAL_MOTORS) + pub const GENERAL_MOTORS: i32 = 104; - /// public static final [GENNUM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GENNUM) - pub const GENNUM : i32 = 59; + /// public static final [GENNUM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GENNUM) + pub const GENNUM: i32 = 59; - /// public static final [GEOFORCE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GEOFORCE) - pub const GEOFORCE : i32 = 157; + /// public static final [GEOFORCE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GEOFORCE) + pub const GEOFORCE: i32 = 157; - /// public static final [GIBSON_GUITARS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GIBSON_GUITARS) - pub const GIBSON_GUITARS : i32 = 98; + /// public static final [GIBSON_GUITARS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GIBSON_GUITARS) + pub const GIBSON_GUITARS: i32 = 98; - /// public static final [GN_NETCOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GN_NETCOM) - pub const GN_NETCOM : i32 = 103; + /// public static final [GN_NETCOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GN_NETCOM) + pub const GN_NETCOM: i32 = 103; - /// public static final [GN_RESOUND](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GN_RESOUND) - pub const GN_RESOUND : i32 = 137; + /// public static final [GN_RESOUND](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GN_RESOUND) + pub const GN_RESOUND: i32 = 137; - /// public static final [GOOGLE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GOOGLE) - pub const GOOGLE : i32 = 224; + /// public static final [GOOGLE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GOOGLE) + pub const GOOGLE: i32 = 224; - /// public static final [GREEN_THROTTLE_GAMES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GREEN_THROTTLE_GAMES) - pub const GREEN_THROTTLE_GAMES : i32 = 172; + /// public static final [GREEN_THROTTLE_GAMES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GREEN_THROTTLE_GAMES) + pub const GREEN_THROTTLE_GAMES: i32 = 172; - /// public static final [GROUP_SENSE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GROUP_SENSE) - pub const GROUP_SENSE : i32 = 115; + /// public static final [GROUP_SENSE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#GROUP_SENSE) + pub const GROUP_SENSE: i32 = 115; - /// public static final [HANLYNN_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HANLYNN_TECHNOLOGIES) - pub const HANLYNN_TECHNOLOGIES : i32 = 123; + /// public static final [HANLYNN_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HANLYNN_TECHNOLOGIES) + pub const HANLYNN_TECHNOLOGIES: i32 = 123; - /// public static final [HARMAN_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HARMAN_INTERNATIONAL) - pub const HARMAN_INTERNATIONAL : i32 = 87; + /// public static final [HARMAN_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HARMAN_INTERNATIONAL) + pub const HARMAN_INTERNATIONAL: i32 = 87; - /// public static final [HEWLETT_PACKARD](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HEWLETT_PACKARD) - pub const HEWLETT_PACKARD : i32 = 101; + /// public static final [HEWLETT_PACKARD](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HEWLETT_PACKARD) + pub const HEWLETT_PACKARD: i32 = 101; - /// public static final [HITACHI](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HITACHI) - pub const HITACHI : i32 = 41; + /// public static final [HITACHI](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HITACHI) + pub const HITACHI: i32 = 41; - /// public static final [HOSIDEN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HOSIDEN) - pub const HOSIDEN : i32 = 221; + /// public static final [HOSIDEN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#HOSIDEN) + pub const HOSIDEN: i32 = 221; - /// public static final [IBM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#IBM) - pub const IBM : i32 = 3; + /// public static final [IBM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#IBM) + pub const IBM: i32 = 3; - /// public static final [INFINEON_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INFINEON_TECHNOLOGIES) - pub const INFINEON_TECHNOLOGIES : i32 = 9; + /// public static final [INFINEON_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INFINEON_TECHNOLOGIES) + pub const INFINEON_TECHNOLOGIES: i32 = 9; - /// public static final [INGENIEUR_SYSTEMGRUPPE_ZAHN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INGENIEUR_SYSTEMGRUPPE_ZAHN) - pub const INGENIEUR_SYSTEMGRUPPE_ZAHN : i32 = 171; + /// public static final [INGENIEUR_SYSTEMGRUPPE_ZAHN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INGENIEUR_SYSTEMGRUPPE_ZAHN) + pub const INGENIEUR_SYSTEMGRUPPE_ZAHN: i32 = 171; - /// public static final [INTEGRATED_SILICON_SOLUTION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INTEGRATED_SILICON_SOLUTION) - pub const INTEGRATED_SILICON_SOLUTION : i32 = 65; + /// public static final [INTEGRATED_SILICON_SOLUTION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INTEGRATED_SILICON_SOLUTION) + pub const INTEGRATED_SILICON_SOLUTION: i32 = 65; - /// public static final [INTEGRATED_SYSTEM_SOLUTION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INTEGRATED_SYSTEM_SOLUTION) - pub const INTEGRATED_SYSTEM_SOLUTION : i32 = 57; + /// public static final [INTEGRATED_SYSTEM_SOLUTION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INTEGRATED_SYSTEM_SOLUTION) + pub const INTEGRATED_SYSTEM_SOLUTION: i32 = 57; - /// public static final [INTEL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INTEL) - pub const INTEL : i32 = 2; + /// public static final [INTEL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INTEL) + pub const INTEL: i32 = 2; - /// public static final [INVENTEL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INVENTEL) - pub const INVENTEL : i32 = 30; + /// public static final [INVENTEL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#INVENTEL) + pub const INVENTEL: i32 = 30; - /// public static final [IPEXTREME](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#IPEXTREME) - pub const IPEXTREME : i32 = 61; + /// public static final [IPEXTREME](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#IPEXTREME) + pub const IPEXTREME: i32 = 61; - /// public static final [I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION) - pub const I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION : i32 = 153; + /// public static final [I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION) + pub const I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION: i32 = 153; - /// public static final [JAWBONE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#JAWBONE) - pub const JAWBONE : i32 = 138; + /// public static final [JAWBONE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#JAWBONE) + pub const JAWBONE: i32 = 138; - /// public static final [JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS) - pub const JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS : i32 = 155; + /// public static final [JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS) + pub const JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS: i32 = 155; - /// public static final [JOHNSON_CONTROLS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#JOHNSON_CONTROLS) - pub const JOHNSON_CONTROLS : i32 = 185; + /// public static final [JOHNSON_CONTROLS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#JOHNSON_CONTROLS) + pub const JOHNSON_CONTROLS: i32 = 185; - /// public static final [J_AND_M](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#J_AND_M) - pub const J_AND_M : i32 = 82; + /// public static final [J_AND_M](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#J_AND_M) + pub const J_AND_M: i32 = 82; - /// public static final [KAWANTECH](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#KAWANTECH) - pub const KAWANTECH : i32 = 212; + /// public static final [KAWANTECH](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#KAWANTECH) + pub const KAWANTECH: i32 = 212; - /// public static final [KC_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#KC_TECHNOLOGY) - pub const KC_TECHNOLOGY : i32 = 22; + /// public static final [KC_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#KC_TECHNOLOGY) + pub const KC_TECHNOLOGY: i32 = 22; - /// public static final [KENSINGTON_COMPUTER_PRODUCTS_GROUP](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#KENSINGTON_COMPUTER_PRODUCTS_GROUP) - pub const KENSINGTON_COMPUTER_PRODUCTS_GROUP : i32 = 160; + /// public static final [KENSINGTON_COMPUTER_PRODUCTS_GROUP](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#KENSINGTON_COMPUTER_PRODUCTS_GROUP) + pub const KENSINGTON_COMPUTER_PRODUCTS_GROUP: i32 = 160; - /// public static final [LAIRD_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LAIRD_TECHNOLOGIES) - pub const LAIRD_TECHNOLOGIES : i32 = 119; + /// public static final [LAIRD_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LAIRD_TECHNOLOGIES) + pub const LAIRD_TECHNOLOGIES: i32 = 119; - /// public static final [LESSWIRE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LESSWIRE) - pub const LESSWIRE : i32 = 121; + /// public static final [LESSWIRE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LESSWIRE) + pub const LESSWIRE: i32 = 121; - /// public static final [LG_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LG_ELECTRONICS) - pub const LG_ELECTRONICS : i32 = 196; + /// public static final [LG_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LG_ELECTRONICS) + pub const LG_ELECTRONICS: i32 = 196; - /// public static final [LINAK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LINAK) - pub const LINAK : i32 = 164; + /// public static final [LINAK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LINAK) + pub const LINAK: i32 = 164; - /// public static final [LUCENT](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LUCENT) - pub const LUCENT : i32 = 7; + /// public static final [LUCENT](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LUCENT) + pub const LUCENT: i32 = 7; - /// public static final [LUDUS_HELSINKI](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LUDUS_HELSINKI) - pub const LUDUS_HELSINKI : i32 = 132; + /// public static final [LUDUS_HELSINKI](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#LUDUS_HELSINKI) + pub const LUDUS_HELSINKI: i32 = 132; - /// public static final [MACRONIX](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MACRONIX) - pub const MACRONIX : i32 = 44; + /// public static final [MACRONIX](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MACRONIX) + pub const MACRONIX: i32 = 44; - /// public static final [MAGNETI_MARELLI](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MAGNETI_MARELLI) - pub const MAGNETI_MARELLI : i32 = 169; + /// public static final [MAGNETI_MARELLI](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MAGNETI_MARELLI) + pub const MAGNETI_MARELLI: i32 = 169; - /// public static final [MANSELLA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MANSELLA) - pub const MANSELLA : i32 = 33; + /// public static final [MANSELLA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MANSELLA) + pub const MANSELLA: i32 = 33; - /// public static final [MARVELL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MARVELL) - pub const MARVELL : i32 = 72; + /// public static final [MARVELL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MARVELL) + pub const MARVELL: i32 = 72; - /// public static final [MATSUSHITA_ELECTRIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MATSUSHITA_ELECTRIC) - pub const MATSUSHITA_ELECTRIC : i32 = 58; + /// public static final [MATSUSHITA_ELECTRIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MATSUSHITA_ELECTRIC) + pub const MATSUSHITA_ELECTRIC: i32 = 58; - /// public static final [MC10](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MC10) - pub const MC10 : i32 = 202; + /// public static final [MC10](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MC10) + pub const MC10: i32 = 202; - /// public static final [MEDIATEK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MEDIATEK) - pub const MEDIATEK : i32 = 70; + /// public static final [MEDIATEK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MEDIATEK) + pub const MEDIATEK: i32 = 70; - /// public static final [MESO_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MESO_INTERNATIONAL) - pub const MESO_INTERNATIONAL : i32 = 182; + /// public static final [MESO_INTERNATIONAL](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MESO_INTERNATIONAL) + pub const MESO_INTERNATIONAL: i32 = 182; - /// public static final [META_WATCH](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#META_WATCH) - pub const META_WATCH : i32 = 163; + /// public static final [META_WATCH](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#META_WATCH) + pub const META_WATCH: i32 = 163; - /// public static final [MEWTEL_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MEWTEL_TECHNOLOGY) - pub const MEWTEL_TECHNOLOGY : i32 = 47; + /// public static final [MEWTEL_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MEWTEL_TECHNOLOGY) + pub const MEWTEL_TECHNOLOGY: i32 = 47; - /// public static final [MICOMMAND](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MICOMMAND) - pub const MICOMMAND : i32 = 99; + /// public static final [MICOMMAND](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MICOMMAND) + pub const MICOMMAND: i32 = 99; - /// public static final [MICROCHIP_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MICROCHIP_TECHNOLOGY) - pub const MICROCHIP_TECHNOLOGY : i32 = 205; + /// public static final [MICROCHIP_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MICROCHIP_TECHNOLOGY) + pub const MICROCHIP_TECHNOLOGY: i32 = 205; - /// public static final [MICROSOFT](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MICROSOFT) - pub const MICROSOFT : i32 = 6; + /// public static final [MICROSOFT](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MICROSOFT) + pub const MICROSOFT: i32 = 6; - /// public static final [MINDTREE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MINDTREE) - pub const MINDTREE : i32 = 106; + /// public static final [MINDTREE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MINDTREE) + pub const MINDTREE: i32 = 106; - /// public static final [MISFIT_WEARABLES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MISFIT_WEARABLES) - pub const MISFIT_WEARABLES : i32 = 223; + /// public static final [MISFIT_WEARABLES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MISFIT_WEARABLES) + pub const MISFIT_WEARABLES: i32 = 223; - /// public static final [MITEL_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MITEL_SEMICONDUCTOR) - pub const MITEL_SEMICONDUCTOR : i32 = 16; + /// public static final [MITEL_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MITEL_SEMICONDUCTOR) + pub const MITEL_SEMICONDUCTOR: i32 = 16; - /// public static final [MITSUBISHI_ELECTRIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MITSUBISHI_ELECTRIC) - pub const MITSUBISHI_ELECTRIC : i32 = 20; + /// public static final [MITSUBISHI_ELECTRIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MITSUBISHI_ELECTRIC) + pub const MITSUBISHI_ELECTRIC: i32 = 20; - /// public static final [MOBILIAN_CORPORATION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MOBILIAN_CORPORATION) - pub const MOBILIAN_CORPORATION : i32 = 55; + /// public static final [MOBILIAN_CORPORATION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MOBILIAN_CORPORATION) + pub const MOBILIAN_CORPORATION: i32 = 55; - /// public static final [MONSTER](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MONSTER) - pub const MONSTER : i32 = 112; + /// public static final [MONSTER](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MONSTER) + pub const MONSTER: i32 = 112; - /// public static final [MOTOROLA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MOTOROLA) - pub const MOTOROLA : i32 = 8; + /// public static final [MOTOROLA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MOTOROLA) + pub const MOTOROLA: i32 = 8; - /// public static final [MSTAR_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MSTAR_SEMICONDUCTOR) - pub const MSTAR_SEMICONDUCTOR : i32 = 122; + /// public static final [MSTAR_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MSTAR_SEMICONDUCTOR) + pub const MSTAR_SEMICONDUCTOR: i32 = 122; - /// public static final [MUZIK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MUZIK) - pub const MUZIK : i32 = 222; + /// public static final [MUZIK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#MUZIK) + pub const MUZIK: i32 = 222; - /// public static final [NEC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NEC) - pub const NEC : i32 = 34; + /// public static final [NEC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NEC) + pub const NEC: i32 = 34; - /// public static final [NEC_LIGHTING](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NEC_LIGHTING) - pub const NEC_LIGHTING : i32 = 149; + /// public static final [NEC_LIGHTING](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NEC_LIGHTING) + pub const NEC_LIGHTING: i32 = 149; - /// public static final [NEWLOGIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NEWLOGIC) - pub const NEWLOGIC : i32 = 23; + /// public static final [NEWLOGIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NEWLOGIC) + pub const NEWLOGIC: i32 = 23; - /// public static final [NIKE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NIKE) - pub const NIKE : i32 = 120; + /// public static final [NIKE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NIKE) + pub const NIKE: i32 = 120; - /// public static final [NINE_SOLUTIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NINE_SOLUTIONS) - pub const NINE_SOLUTIONS : i32 = 102; + /// public static final [NINE_SOLUTIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NINE_SOLUTIONS) + pub const NINE_SOLUTIONS: i32 = 102; - /// public static final [NOKIA_MOBILE_PHONES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NOKIA_MOBILE_PHONES) - pub const NOKIA_MOBILE_PHONES : i32 = 1; + /// public static final [NOKIA_MOBILE_PHONES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NOKIA_MOBILE_PHONES) + pub const NOKIA_MOBILE_PHONES: i32 = 1; - /// public static final [NORDIC_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NORDIC_SEMICONDUCTOR) - pub const NORDIC_SEMICONDUCTOR : i32 = 89; + /// public static final [NORDIC_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NORDIC_SEMICONDUCTOR) + pub const NORDIC_SEMICONDUCTOR: i32 = 89; - /// public static final [NORWOOD_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NORWOOD_SYSTEMS) - pub const NORWOOD_SYSTEMS : i32 = 46; + /// public static final [NORWOOD_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#NORWOOD_SYSTEMS) + pub const NORWOOD_SYSTEMS: i32 = 46; - /// public static final [ODM_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ODM_TECHNOLOGY) - pub const ODM_TECHNOLOGY : i32 = 150; + /// public static final [ODM_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ODM_TECHNOLOGY) + pub const ODM_TECHNOLOGY: i32 = 150; - /// public static final [OMEGAWAVE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#OMEGAWAVE) - pub const OMEGAWAVE : i32 = 174; + /// public static final [OMEGAWAVE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#OMEGAWAVE) + pub const OMEGAWAVE: i32 = 174; - /// public static final [ONSET_COMPUTER](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ONSET_COMPUTER) - pub const ONSET_COMPUTER : i32 = 197; + /// public static final [ONSET_COMPUTER](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ONSET_COMPUTER) + pub const ONSET_COMPUTER: i32 = 197; - /// public static final [OPEN_INTERFACE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#OPEN_INTERFACE) - pub const OPEN_INTERFACE : i32 = 39; + /// public static final [OPEN_INTERFACE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#OPEN_INTERFACE) + pub const OPEN_INTERFACE: i32 = 39; - /// public static final [OTL_DYNAMICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#OTL_DYNAMICS) - pub const OTL_DYNAMICS : i32 = 165; + /// public static final [OTL_DYNAMICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#OTL_DYNAMICS) + pub const OTL_DYNAMICS: i32 = 165; - /// public static final [PANDA_OCEAN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PANDA_OCEAN) - pub const PANDA_OCEAN : i32 = 166; + /// public static final [PANDA_OCEAN](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PANDA_OCEAN) + pub const PANDA_OCEAN: i32 = 166; - /// public static final [PARROT](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PARROT) - pub const PARROT : i32 = 67; + /// public static final [PARROT](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PARROT) + pub const PARROT: i32 = 67; - /// public static final [PARTHUS_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PARTHUS_TECHNOLOGIES) - pub const PARTHUS_TECHNOLOGIES : i32 = 14; + /// public static final [PARTHUS_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PARTHUS_TECHNOLOGIES) + pub const PARTHUS_TECHNOLOGIES: i32 = 14; - /// public static final [PASSIF_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PASSIF_SEMICONDUCTOR) - pub const PASSIF_SEMICONDUCTOR : i32 = 176; + /// public static final [PASSIF_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PASSIF_SEMICONDUCTOR) + pub const PASSIF_SEMICONDUCTOR: i32 = 176; - /// public static final [PETER_SYSTEMTECHNIK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PETER_SYSTEMTECHNIK) - pub const PETER_SYSTEMTECHNIK : i32 = 173; + /// public static final [PETER_SYSTEMTECHNIK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PETER_SYSTEMTECHNIK) + pub const PETER_SYSTEMTECHNIK: i32 = 173; - /// public static final [PHILIPS_SEMICONDUCTORS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PHILIPS_SEMICONDUCTORS) - pub const PHILIPS_SEMICONDUCTORS : i32 = 37; + /// public static final [PHILIPS_SEMICONDUCTORS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PHILIPS_SEMICONDUCTORS) + pub const PHILIPS_SEMICONDUCTORS: i32 = 37; - /// public static final [PLANTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PLANTRONICS) - pub const PLANTRONICS : i32 = 85; + /// public static final [PLANTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PLANTRONICS) + pub const PLANTRONICS: i32 = 85; - /// public static final [POLAR_ELECTRO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#POLAR_ELECTRO) - pub const POLAR_ELECTRO : i32 = 107; + /// public static final [POLAR_ELECTRO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#POLAR_ELECTRO) + pub const POLAR_ELECTRO: i32 = 107; - /// public static final [POLAR_ELECTRO_EUROPE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#POLAR_ELECTRO_EUROPE) - pub const POLAR_ELECTRO_EUROPE : i32 = 209; + /// public static final [POLAR_ELECTRO_EUROPE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#POLAR_ELECTRO_EUROPE) + pub const POLAR_ELECTRO_EUROPE: i32 = 209; - /// public static final [PROCTER_AND_GAMBLE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PROCTER_AND_GAMBLE) - pub const PROCTER_AND_GAMBLE : i32 = 220; + /// public static final [PROCTER_AND_GAMBLE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#PROCTER_AND_GAMBLE) + pub const PROCTER_AND_GAMBLE: i32 = 220; - /// public static final [QUALCOMM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM) - pub const QUALCOMM : i32 = 29; + /// public static final [QUALCOMM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM) + pub const QUALCOMM: i32 = 29; - /// public static final [QUALCOMM_CONNECTED_EXPERIENCES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM_CONNECTED_EXPERIENCES) - pub const QUALCOMM_CONNECTED_EXPERIENCES : i32 = 216; + /// public static final [QUALCOMM_CONNECTED_EXPERIENCES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM_CONNECTED_EXPERIENCES) + pub const QUALCOMM_CONNECTED_EXPERIENCES: i32 = 216; - /// public static final [QUALCOMM_INNOVATION_CENTER](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM_INNOVATION_CENTER) - pub const QUALCOMM_INNOVATION_CENTER : i32 = 184; + /// public static final [QUALCOMM_INNOVATION_CENTER](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM_INNOVATION_CENTER) + pub const QUALCOMM_INNOVATION_CENTER: i32 = 184; - /// public static final [QUALCOMM_LABS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM_LABS) - pub const QUALCOMM_LABS : i32 = 140; + /// public static final [QUALCOMM_LABS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM_LABS) + pub const QUALCOMM_LABS: i32 = 140; - /// public static final [QUALCOMM_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM_TECHNOLOGIES) - pub const QUALCOMM_TECHNOLOGIES : i32 = 215; + /// public static final [QUALCOMM_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUALCOMM_TECHNOLOGIES) + pub const QUALCOMM_TECHNOLOGIES: i32 = 215; - /// public static final [QUINTIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUINTIC) - pub const QUINTIC : i32 = 142; + /// public static final [QUINTIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUINTIC) + pub const QUINTIC: i32 = 142; - /// public static final [QUUPPA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUUPPA) - pub const QUUPPA : i32 = 199; + /// public static final [QUUPPA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#QUUPPA) + pub const QUUPPA: i32 = 199; - /// public static final [RALINK_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RALINK_TECHNOLOGY) - pub const RALINK_TECHNOLOGY : i32 = 91; + /// public static final [RALINK_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RALINK_TECHNOLOGY) + pub const RALINK_TECHNOLOGY: i32 = 91; - /// public static final [RDA_MICROELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RDA_MICROELECTRONICS) - pub const RDA_MICROELECTRONICS : i32 = 97; + /// public static final [RDA_MICROELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RDA_MICROELECTRONICS) + pub const RDA_MICROELECTRONICS: i32 = 97; - /// public static final [REALTEK_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#REALTEK_SEMICONDUCTOR) - pub const REALTEK_SEMICONDUCTOR : i32 = 93; + /// public static final [REALTEK_SEMICONDUCTOR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#REALTEK_SEMICONDUCTOR) + pub const REALTEK_SEMICONDUCTOR: i32 = 93; - /// public static final [RED_M](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RED_M) - pub const RED_M : i32 = 50; + /// public static final [RED_M](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RED_M) + pub const RED_M: i32 = 50; - /// public static final [RENESAS_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RENESAS_TECHNOLOGY) - pub const RENESAS_TECHNOLOGY : i32 = 54; + /// public static final [RENESAS_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RENESAS_TECHNOLOGY) + pub const RENESAS_TECHNOLOGY: i32 = 54; - /// public static final [RESEARCH_IN_MOTION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RESEARCH_IN_MOTION) - pub const RESEARCH_IN_MOTION : i32 = 60; + /// public static final [RESEARCH_IN_MOTION](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RESEARCH_IN_MOTION) + pub const RESEARCH_IN_MOTION: i32 = 60; - /// public static final [RF_MICRO_DEVICES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RF_MICRO_DEVICES) - pub const RF_MICRO_DEVICES : i32 = 40; + /// public static final [RF_MICRO_DEVICES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RF_MICRO_DEVICES) + pub const RF_MICRO_DEVICES: i32 = 40; - /// public static final [RIVIERAWAVES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RIVIERAWAVES) - pub const RIVIERAWAVES : i32 = 96; + /// public static final [RIVIERAWAVES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RIVIERAWAVES) + pub const RIVIERAWAVES: i32 = 96; - /// public static final [ROHDE_AND_SCHWARZ](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ROHDE_AND_SCHWARZ) - pub const ROHDE_AND_SCHWARZ : i32 = 25; + /// public static final [ROHDE_AND_SCHWARZ](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ROHDE_AND_SCHWARZ) + pub const ROHDE_AND_SCHWARZ: i32 = 25; - /// public static final [RTX_TELECOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RTX_TELECOM) - pub const RTX_TELECOM : i32 = 21; + /// public static final [RTX_TELECOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#RTX_TELECOM) + pub const RTX_TELECOM: i32 = 21; - /// public static final [SAMSUNG_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SAMSUNG_ELECTRONICS) - pub const SAMSUNG_ELECTRONICS : i32 = 117; + /// public static final [SAMSUNG_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SAMSUNG_ELECTRONICS) + pub const SAMSUNG_ELECTRONICS: i32 = 117; - /// public static final [SARIS_CYCLING_GROUP](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SARIS_CYCLING_GROUP) - pub const SARIS_CYCLING_GROUP : i32 = 177; + /// public static final [SARIS_CYCLING_GROUP](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SARIS_CYCLING_GROUP) + pub const SARIS_CYCLING_GROUP: i32 = 177; - /// public static final [SEERS_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SEERS_TECHNOLOGY) - pub const SEERS_TECHNOLOGY : i32 = 125; + /// public static final [SEERS_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SEERS_TECHNOLOGY) + pub const SEERS_TECHNOLOGY: i32 = 125; - /// public static final [SEIKO_EPSON](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SEIKO_EPSON) - pub const SEIKO_EPSON : i32 = 64; + /// public static final [SEIKO_EPSON](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SEIKO_EPSON) + pub const SEIKO_EPSON: i32 = 64; - /// public static final [SELFLY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SELFLY) - pub const SELFLY : i32 = 198; + /// public static final [SELFLY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SELFLY) + pub const SELFLY: i32 = 198; - /// public static final [SEMILINK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SEMILINK) - pub const SEMILINK : i32 = 226; + /// public static final [SEMILINK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SEMILINK) + pub const SEMILINK: i32 = 226; - /// public static final [SENNHEISER_COMMUNICATIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SENNHEISER_COMMUNICATIONS) - pub const SENNHEISER_COMMUNICATIONS : i32 = 130; + /// public static final [SENNHEISER_COMMUNICATIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SENNHEISER_COMMUNICATIONS) + pub const SENNHEISER_COMMUNICATIONS: i32 = 130; - /// public static final [SHANGHAI_SUPER_SMART_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SHANGHAI_SUPER_SMART_ELECTRONICS) - pub const SHANGHAI_SUPER_SMART_ELECTRONICS : i32 = 114; + /// public static final [SHANGHAI_SUPER_SMART_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SHANGHAI_SUPER_SMART_ELECTRONICS) + pub const SHANGHAI_SUPER_SMART_ELECTRONICS: i32 = 114; - /// public static final [SHENZHEN_EXCELSECU_DATA_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SHENZHEN_EXCELSECU_DATA_TECHNOLOGY) - pub const SHENZHEN_EXCELSECU_DATA_TECHNOLOGY : i32 = 193; + /// public static final [SHENZHEN_EXCELSECU_DATA_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SHENZHEN_EXCELSECU_DATA_TECHNOLOGY) + pub const SHENZHEN_EXCELSECU_DATA_TECHNOLOGY: i32 = 193; - /// public static final [SIGNIA_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SIGNIA_TECHNOLOGIES) - pub const SIGNIA_TECHNOLOGIES : i32 = 27; + /// public static final [SIGNIA_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SIGNIA_TECHNOLOGIES) + pub const SIGNIA_TECHNOLOGIES: i32 = 27; - /// public static final [SILICON_WAVE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SILICON_WAVE) - pub const SILICON_WAVE : i32 = 11; + /// public static final [SILICON_WAVE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SILICON_WAVE) + pub const SILICON_WAVE: i32 = 11; - /// public static final [SIRF_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SIRF_TECHNOLOGY) - pub const SIRF_TECHNOLOGY : i32 = 80; + /// public static final [SIRF_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SIRF_TECHNOLOGY) + pub const SIRF_TECHNOLOGY: i32 = 80; - /// public static final [SOCKET_MOBILE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SOCKET_MOBILE) - pub const SOCKET_MOBILE : i32 = 68; + /// public static final [SOCKET_MOBILE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SOCKET_MOBILE) + pub const SOCKET_MOBILE: i32 = 68; - /// public static final [SONY_ERICSSON](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SONY_ERICSSON) - pub const SONY_ERICSSON : i32 = 86; + /// public static final [SONY_ERICSSON](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SONY_ERICSSON) + pub const SONY_ERICSSON: i32 = 86; - /// public static final [SOUND_ID](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SOUND_ID) - pub const SOUND_ID : i32 = 111; + /// public static final [SOUND_ID](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SOUND_ID) + pub const SOUND_ID: i32 = 111; - /// public static final [SPORTS_TRACKING_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SPORTS_TRACKING_TECHNOLOGIES) - pub const SPORTS_TRACKING_TECHNOLOGIES : i32 = 126; + /// public static final [SPORTS_TRACKING_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SPORTS_TRACKING_TECHNOLOGIES) + pub const SPORTS_TRACKING_TECHNOLOGIES: i32 = 126; - /// public static final [SR_MEDIZINELEKTRONIK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SR_MEDIZINELEKTRONIK) - pub const SR_MEDIZINELEKTRONIK : i32 = 161; + /// public static final [SR_MEDIZINELEKTRONIK](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SR_MEDIZINELEKTRONIK) + pub const SR_MEDIZINELEKTRONIK: i32 = 161; - /// public static final [STACCATO_COMMUNICATIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STACCATO_COMMUNICATIONS) - pub const STACCATO_COMMUNICATIONS : i32 = 77; + /// public static final [STACCATO_COMMUNICATIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STACCATO_COMMUNICATIONS) + pub const STACCATO_COMMUNICATIONS: i32 = 77; - /// public static final [STALMART_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STALMART_TECHNOLOGY) - pub const STALMART_TECHNOLOGY : i32 = 191; + /// public static final [STALMART_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STALMART_TECHNOLOGY) + pub const STALMART_TECHNOLOGY: i32 = 191; - /// public static final [STARKEY_LABORATORIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STARKEY_LABORATORIES) - pub const STARKEY_LABORATORIES : i32 = 186; + /// public static final [STARKEY_LABORATORIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STARKEY_LABORATORIES) + pub const STARKEY_LABORATORIES: i32 = 186; - /// public static final [STOLLMAN_E_PLUS_V](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STOLLMAN_E_PLUS_V) - pub const STOLLMAN_E_PLUS_V : i32 = 143; + /// public static final [STOLLMAN_E_PLUS_V](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STOLLMAN_E_PLUS_V) + pub const STOLLMAN_E_PLUS_V: i32 = 143; - /// public static final [STONESTREET_ONE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STONESTREET_ONE) - pub const STONESTREET_ONE : i32 = 94; + /// public static final [STONESTREET_ONE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#STONESTREET_ONE) + pub const STONESTREET_ONE: i32 = 94; - /// public static final [ST_MICROELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ST_MICROELECTRONICS) - pub const ST_MICROELECTRONICS : i32 = 48; + /// public static final [ST_MICROELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ST_MICROELECTRONICS) + pub const ST_MICROELECTRONICS: i32 = 48; - /// public static final [SUMMIT_DATA_COMMUNICATIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SUMMIT_DATA_COMMUNICATIONS) - pub const SUMMIT_DATA_COMMUNICATIONS : i32 = 110; + /// public static final [SUMMIT_DATA_COMMUNICATIONS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SUMMIT_DATA_COMMUNICATIONS) + pub const SUMMIT_DATA_COMMUNICATIONS: i32 = 110; - /// public static final [SUUNTO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SUUNTO) - pub const SUUNTO : i32 = 159; + /// public static final [SUUNTO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SUUNTO) + pub const SUUNTO: i32 = 159; - /// public static final [SWIRL_NETWORKS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SWIRL_NETWORKS) - pub const SWIRL_NETWORKS : i32 = 181; + /// public static final [SWIRL_NETWORKS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SWIRL_NETWORKS) + pub const SWIRL_NETWORKS: i32 = 181; - /// public static final [SYMBOL_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SYMBOL_TECHNOLOGIES) - pub const SYMBOL_TECHNOLOGIES : i32 = 42; + /// public static final [SYMBOL_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SYMBOL_TECHNOLOGIES) + pub const SYMBOL_TECHNOLOGIES: i32 = 42; - /// public static final [SYNOPSYS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SYNOPSYS) - pub const SYNOPSYS : i32 = 49; + /// public static final [SYNOPSYS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SYNOPSYS) + pub const SYNOPSYS: i32 = 49; - /// public static final [SYSTEMS_AND_CHIPS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SYSTEMS_AND_CHIPS) - pub const SYSTEMS_AND_CHIPS : i32 = 62; + /// public static final [SYSTEMS_AND_CHIPS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#SYSTEMS_AND_CHIPS) + pub const SYSTEMS_AND_CHIPS: i32 = 62; - /// public static final [S_POWER_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#S_POWER_ELECTRONICS) - pub const S_POWER_ELECTRONICS : i32 = 187; + /// public static final [S_POWER_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#S_POWER_ELECTRONICS) + pub const S_POWER_ELECTRONICS: i32 = 187; - /// public static final [TAIXINGBANG_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TAIXINGBANG_TECHNOLOGY) - pub const TAIXINGBANG_TECHNOLOGY : i32 = 211; + /// public static final [TAIXINGBANG_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TAIXINGBANG_TECHNOLOGY) + pub const TAIXINGBANG_TECHNOLOGY: i32 = 211; - /// public static final [TENOVIS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TENOVIS) - pub const TENOVIS : i32 = 43; + /// public static final [TENOVIS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TENOVIS) + pub const TENOVIS: i32 = 43; - /// public static final [TERAX](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TERAX) - pub const TERAX : i32 = 56; + /// public static final [TERAX](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TERAX) + pub const TERAX: i32 = 56; - /// public static final [TEXAS_INSTRUMENTS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TEXAS_INSTRUMENTS) - pub const TEXAS_INSTRUMENTS : i32 = 13; + /// public static final [TEXAS_INSTRUMENTS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TEXAS_INSTRUMENTS) + pub const TEXAS_INSTRUMENTS: i32 = 13; - /// public static final [THINKOPTICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#THINKOPTICS) - pub const THINKOPTICS : i32 = 146; + /// public static final [THINKOPTICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#THINKOPTICS) + pub const THINKOPTICS: i32 = 146; - /// public static final [THREECOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#THREECOM) - pub const THREECOM : i32 = 5; + /// public static final [THREECOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#THREECOM) + pub const THREECOM: i32 = 5; - /// public static final [THREE_DIJOY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#THREE_DIJOY) - pub const THREE_DIJOY : i32 = 84; + /// public static final [THREE_DIJOY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#THREE_DIJOY) + pub const THREE_DIJOY: i32 = 84; - /// public static final [THREE_DSP](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#THREE_DSP) - pub const THREE_DSP : i32 = 73; + /// public static final [THREE_DSP](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#THREE_DSP) + pub const THREE_DSP: i32 = 73; - /// public static final [TIMEKEEPING_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TIMEKEEPING_SYSTEMS) - pub const TIMEKEEPING_SYSTEMS : i32 = 131; + /// public static final [TIMEKEEPING_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TIMEKEEPING_SYSTEMS) + pub const TIMEKEEPING_SYSTEMS: i32 = 131; - /// public static final [TIMEX_GROUP_USA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TIMEX_GROUP_USA) - pub const TIMEX_GROUP_USA : i32 = 214; + /// public static final [TIMEX_GROUP_USA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TIMEX_GROUP_USA) + pub const TIMEX_GROUP_USA: i32 = 214; - /// public static final [TOPCORN_POSITIONING_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TOPCORN_POSITIONING_SYSTEMS) - pub const TOPCORN_POSITIONING_SYSTEMS : i32 = 139; + /// public static final [TOPCORN_POSITIONING_SYSTEMS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TOPCORN_POSITIONING_SYSTEMS) + pub const TOPCORN_POSITIONING_SYSTEMS: i32 = 139; - /// public static final [TOSHIBA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TOSHIBA) - pub const TOSHIBA : i32 = 4; + /// public static final [TOSHIBA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TOSHIBA) + pub const TOSHIBA: i32 = 4; - /// public static final [TRANSILICA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TRANSILICA) - pub const TRANSILICA : i32 = 24; + /// public static final [TRANSILICA](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TRANSILICA) + pub const TRANSILICA: i32 = 24; - /// public static final [TRELAB](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TRELAB) - pub const TRELAB : i32 = 183; + /// public static final [TRELAB](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TRELAB) + pub const TRELAB: i32 = 183; - /// public static final [TTPCOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TTPCOM) - pub const TTPCOM : i32 = 26; + /// public static final [TTPCOM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TTPCOM) + pub const TTPCOM: i32 = 26; - /// public static final [TXTR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TXTR) - pub const TXTR : i32 = 218; + /// public static final [TXTR](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TXTR) + pub const TXTR: i32 = 218; - /// public static final [TZERO_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TZERO_TECHNOLOGIES) - pub const TZERO_TECHNOLOGIES : i32 = 81; + /// public static final [TZERO_TECHNOLOGIES](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#TZERO_TECHNOLOGIES) + pub const TZERO_TECHNOLOGIES: i32 = 81; - /// public static final [UNIVERSAL_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#UNIVERSAL_ELECTRONICS) - pub const UNIVERSAL_ELECTRONICS : i32 = 147; + /// public static final [UNIVERSAL_ELECTRONICS](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#UNIVERSAL_ELECTRONICS) + pub const UNIVERSAL_ELECTRONICS: i32 = 147; - /// public static final [VERTU](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#VERTU) - pub const VERTU : i32 = 162; + /// public static final [VERTU](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#VERTU) + pub const VERTU: i32 = 162; - /// public static final [VISTEON](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#VISTEON) - pub const VISTEON : i32 = 167; + /// public static final [VISTEON](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#VISTEON) + pub const VISTEON: i32 = 167; - /// public static final [VIZIO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#VIZIO) - pub const VIZIO : i32 = 88; + /// public static final [VIZIO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#VIZIO) + pub const VIZIO: i32 = 88; - /// public static final [VOYETRA_TURTLE_BEACH](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#VOYETRA_TURTLE_BEACH) - pub const VOYETRA_TURTLE_BEACH : i32 = 217; + /// public static final [VOYETRA_TURTLE_BEACH](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#VOYETRA_TURTLE_BEACH) + pub const VOYETRA_TURTLE_BEACH: i32 = 217; - /// public static final [WAVEPLUS_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#WAVEPLUS_TECHNOLOGY) - pub const WAVEPLUS_TECHNOLOGY : i32 = 35; + /// public static final [WAVEPLUS_TECHNOLOGY](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#WAVEPLUS_TECHNOLOGY) + pub const WAVEPLUS_TECHNOLOGY: i32 = 35; - /// public static final [WICENTRIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#WICENTRIC) - pub const WICENTRIC : i32 = 95; + /// public static final [WICENTRIC](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#WICENTRIC) + pub const WICENTRIC: i32 = 95; - /// public static final [WIDCOMM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#WIDCOMM) - pub const WIDCOMM : i32 = 17; + /// public static final [WIDCOMM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#WIDCOMM) + pub const WIDCOMM: i32 = 17; - /// public static final [WUXI_VIMICRO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#WUXI_VIMICRO) - pub const WUXI_VIMICRO : i32 = 129; + /// public static final [WUXI_VIMICRO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#WUXI_VIMICRO) + pub const WUXI_VIMICRO: i32 = 129; - /// public static final [ZEEVO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ZEEVO) - pub const ZEEVO : i32 = 18; + /// public static final [ZEEVO](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ZEEVO) + pub const ZEEVO: i32 = 18; - /// public static final [ZER01_TV](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ZER01_TV) - pub const ZER01_TV : i32 = 152; + /// public static final [ZER01_TV](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ZER01_TV) + pub const ZER01_TV: i32 = 152; - /// public static final [ZOMM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ZOMM) - pub const ZOMM : i32 = 116; + /// public static final [ZOMM](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ZOMM) + pub const ZOMM: i32 = 116; - /// public static final [ZSCAN_SOFTWARE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ZSCAN_SOFTWARE) - pub const ZSCAN_SOFTWARE : i32 = 141; - } + /// public static final [ZSCAN_SOFTWARE](https://developer.android.com/reference/android/bluetooth/BluetoothAssignedNumbers.html#ZSCAN_SOFTWARE) + pub const ZSCAN_SOFTWARE: i32 = 141; } - ::java_spaghetti::class! { - /// public final class [BluetoothClass](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html) - public final class BluetoothClass ("android/bluetooth/BluetoothClass\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub final class [BluetoothClass](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html) + #[repr(transparent)] + pub struct BluetoothClass(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothClass {} - /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothClass { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothClass\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothClass {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothClass {} + impl ::std::ops::Deref for BluetoothClass { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothClass { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothClass { + /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothClass\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothClass\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothClass\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hasService](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#hasService(int)) - pub fn hasService<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "hasService", .descriptor == "(I)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "hasService\0", "(I)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hasService](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#hasService(int)) + pub fn hasService<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "hasService", .descriptor == "(I)Z" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "hasService\0", "(I)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getMajorDeviceClass](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#getMajorDeviceClass()) - pub fn getMajorDeviceClass<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "getMajorDeviceClass", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "getMajorDeviceClass\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getMajorDeviceClass](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#getMajorDeviceClass()) + pub fn getMajorDeviceClass<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "getMajorDeviceClass", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothClass\0", + "getMajorDeviceClass\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDeviceClass](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#getDeviceClass()) - pub fn getDeviceClass<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "getDeviceClass", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "getDeviceClass\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDeviceClass](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#getDeviceClass()) + pub fn getDeviceClass<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "getDeviceClass", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothClass\0", + "getDeviceClass\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [doesClassMatch](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#doesClassMatch(int)) - pub fn doesClassMatch<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "doesClassMatch", .descriptor == "(I)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass\0", "doesClassMatch\0", "(I)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [doesClassMatch](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#doesClassMatch(int)) + pub fn doesClassMatch<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothClass", java.flags == PUBLIC, .name == "doesClassMatch", .descriptor == "(I)Z" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothClass\0", + "doesClassMatch\0", + "(I)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [PROFILE_A2DP](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#PROFILE_A2DP) - pub const PROFILE_A2DP : i32 = 1; + /// public static final [PROFILE_A2DP](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#PROFILE_A2DP) + pub const PROFILE_A2DP: i32 = 1; - /// public static final [PROFILE_HEADSET](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#PROFILE_HEADSET) - pub const PROFILE_HEADSET : i32 = 0; + /// public static final [PROFILE_HEADSET](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#PROFILE_HEADSET) + pub const PROFILE_HEADSET: i32 = 0; - /// public static final [PROFILE_HID](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#PROFILE_HID) - pub const PROFILE_HID : i32 = 3; - } + /// public static final [PROFILE_HID](https://developer.android.com/reference/android/bluetooth/BluetoothClass.html#PROFILE_HID) + pub const PROFILE_HID: i32 = 3; } - ::java_spaghetti::class! { - /// public class [BluetoothClass.Device](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html) - public class BluetoothClass_Device ("android/bluetooth/BluetoothClass$Device\0") extends super::super::java::lang::Object { + /// pub class [BluetoothClass.Device](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html) + #[repr(transparent)] + pub struct BluetoothClass_Device(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothClass_Device {} - /// [Device](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#Device()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothClass$Device", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass$Device\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothClass_Device { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothClass$Device\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothClass_Device {} + impl ::std::ops::Deref for BluetoothClass_Device { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothClass_Device { + /// [Device](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#Device()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothClass$Device", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothClass$Device\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [AUDIO_VIDEO_CAMCORDER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_CAMCORDER) - pub const AUDIO_VIDEO_CAMCORDER : i32 = 1076; + /// public static final [AUDIO_VIDEO_CAMCORDER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_CAMCORDER) + pub const AUDIO_VIDEO_CAMCORDER: i32 = 1076; - /// public static final [AUDIO_VIDEO_CAR_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_CAR_AUDIO) - pub const AUDIO_VIDEO_CAR_AUDIO : i32 = 1056; + /// public static final [AUDIO_VIDEO_CAR_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_CAR_AUDIO) + pub const AUDIO_VIDEO_CAR_AUDIO: i32 = 1056; - /// public static final [AUDIO_VIDEO_HANDSFREE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_HANDSFREE) - pub const AUDIO_VIDEO_HANDSFREE : i32 = 1032; + /// public static final [AUDIO_VIDEO_HANDSFREE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_HANDSFREE) + pub const AUDIO_VIDEO_HANDSFREE: i32 = 1032; - /// public static final [AUDIO_VIDEO_HEADPHONES](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_HEADPHONES) - pub const AUDIO_VIDEO_HEADPHONES : i32 = 1048; + /// public static final [AUDIO_VIDEO_HEADPHONES](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_HEADPHONES) + pub const AUDIO_VIDEO_HEADPHONES: i32 = 1048; - /// public static final [AUDIO_VIDEO_HIFI_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_HIFI_AUDIO) - pub const AUDIO_VIDEO_HIFI_AUDIO : i32 = 1064; + /// public static final [AUDIO_VIDEO_HIFI_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_HIFI_AUDIO) + pub const AUDIO_VIDEO_HIFI_AUDIO: i32 = 1064; - /// public static final [AUDIO_VIDEO_LOUDSPEAKER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_LOUDSPEAKER) - pub const AUDIO_VIDEO_LOUDSPEAKER : i32 = 1044; + /// public static final [AUDIO_VIDEO_LOUDSPEAKER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_LOUDSPEAKER) + pub const AUDIO_VIDEO_LOUDSPEAKER: i32 = 1044; - /// public static final [AUDIO_VIDEO_MICROPHONE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_MICROPHONE) - pub const AUDIO_VIDEO_MICROPHONE : i32 = 1040; + /// public static final [AUDIO_VIDEO_MICROPHONE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_MICROPHONE) + pub const AUDIO_VIDEO_MICROPHONE: i32 = 1040; - /// public static final [AUDIO_VIDEO_PORTABLE_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_PORTABLE_AUDIO) - pub const AUDIO_VIDEO_PORTABLE_AUDIO : i32 = 1052; + /// public static final [AUDIO_VIDEO_PORTABLE_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_PORTABLE_AUDIO) + pub const AUDIO_VIDEO_PORTABLE_AUDIO: i32 = 1052; - /// public static final [AUDIO_VIDEO_SET_TOP_BOX](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_SET_TOP_BOX) - pub const AUDIO_VIDEO_SET_TOP_BOX : i32 = 1060; + /// public static final [AUDIO_VIDEO_SET_TOP_BOX](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_SET_TOP_BOX) + pub const AUDIO_VIDEO_SET_TOP_BOX: i32 = 1060; - /// public static final [AUDIO_VIDEO_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_UNCATEGORIZED) - pub const AUDIO_VIDEO_UNCATEGORIZED : i32 = 1024; + /// public static final [AUDIO_VIDEO_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_UNCATEGORIZED) + pub const AUDIO_VIDEO_UNCATEGORIZED: i32 = 1024; - /// public static final [AUDIO_VIDEO_VCR](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VCR) - pub const AUDIO_VIDEO_VCR : i32 = 1068; + /// public static final [AUDIO_VIDEO_VCR](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VCR) + pub const AUDIO_VIDEO_VCR: i32 = 1068; - /// public static final [AUDIO_VIDEO_VIDEO_CAMERA](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_CAMERA) - pub const AUDIO_VIDEO_VIDEO_CAMERA : i32 = 1072; + /// public static final [AUDIO_VIDEO_VIDEO_CAMERA](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_CAMERA) + pub const AUDIO_VIDEO_VIDEO_CAMERA: i32 = 1072; - /// public static final [AUDIO_VIDEO_VIDEO_CONFERENCING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_CONFERENCING) - pub const AUDIO_VIDEO_VIDEO_CONFERENCING : i32 = 1088; + /// public static final [AUDIO_VIDEO_VIDEO_CONFERENCING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_CONFERENCING) + pub const AUDIO_VIDEO_VIDEO_CONFERENCING: i32 = 1088; - /// public static final [AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER) - pub const AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER : i32 = 1084; + /// public static final [AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER) + pub const AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER: i32 = 1084; - /// public static final [AUDIO_VIDEO_VIDEO_GAMING_TOY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_GAMING_TOY) - pub const AUDIO_VIDEO_VIDEO_GAMING_TOY : i32 = 1096; + /// public static final [AUDIO_VIDEO_VIDEO_GAMING_TOY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_GAMING_TOY) + pub const AUDIO_VIDEO_VIDEO_GAMING_TOY: i32 = 1096; - /// public static final [AUDIO_VIDEO_VIDEO_MONITOR](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_MONITOR) - pub const AUDIO_VIDEO_VIDEO_MONITOR : i32 = 1080; + /// public static final [AUDIO_VIDEO_VIDEO_MONITOR](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_VIDEO_MONITOR) + pub const AUDIO_VIDEO_VIDEO_MONITOR: i32 = 1080; - /// public static final [AUDIO_VIDEO_WEARABLE_HEADSET](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_WEARABLE_HEADSET) - pub const AUDIO_VIDEO_WEARABLE_HEADSET : i32 = 1028; + /// public static final [AUDIO_VIDEO_WEARABLE_HEADSET](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_WEARABLE_HEADSET) + pub const AUDIO_VIDEO_WEARABLE_HEADSET: i32 = 1028; - /// public static final [COMPUTER_DESKTOP](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_DESKTOP) - pub const COMPUTER_DESKTOP : i32 = 260; + /// public static final [COMPUTER_DESKTOP](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_DESKTOP) + pub const COMPUTER_DESKTOP: i32 = 260; - /// public static final [COMPUTER_HANDHELD_PC_PDA](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_HANDHELD_PC_PDA) - pub const COMPUTER_HANDHELD_PC_PDA : i32 = 272; + /// public static final [COMPUTER_HANDHELD_PC_PDA](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_HANDHELD_PC_PDA) + pub const COMPUTER_HANDHELD_PC_PDA: i32 = 272; - /// public static final [COMPUTER_LAPTOP](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_LAPTOP) - pub const COMPUTER_LAPTOP : i32 = 268; + /// public static final [COMPUTER_LAPTOP](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_LAPTOP) + pub const COMPUTER_LAPTOP: i32 = 268; - /// public static final [COMPUTER_PALM_SIZE_PC_PDA](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_PALM_SIZE_PC_PDA) - pub const COMPUTER_PALM_SIZE_PC_PDA : i32 = 276; + /// public static final [COMPUTER_PALM_SIZE_PC_PDA](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_PALM_SIZE_PC_PDA) + pub const COMPUTER_PALM_SIZE_PC_PDA: i32 = 276; - /// public static final [COMPUTER_SERVER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_SERVER) - pub const COMPUTER_SERVER : i32 = 264; + /// public static final [COMPUTER_SERVER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_SERVER) + pub const COMPUTER_SERVER: i32 = 264; - /// public static final [COMPUTER_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_UNCATEGORIZED) - pub const COMPUTER_UNCATEGORIZED : i32 = 256; + /// public static final [COMPUTER_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_UNCATEGORIZED) + pub const COMPUTER_UNCATEGORIZED: i32 = 256; - /// public static final [COMPUTER_WEARABLE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_WEARABLE) - pub const COMPUTER_WEARABLE : i32 = 280; + /// public static final [COMPUTER_WEARABLE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#COMPUTER_WEARABLE) + pub const COMPUTER_WEARABLE: i32 = 280; - /// public static final [HEALTH_BLOOD_PRESSURE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_BLOOD_PRESSURE) - pub const HEALTH_BLOOD_PRESSURE : i32 = 2308; + /// public static final [HEALTH_BLOOD_PRESSURE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_BLOOD_PRESSURE) + pub const HEALTH_BLOOD_PRESSURE: i32 = 2308; - /// public static final [HEALTH_DATA_DISPLAY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_DATA_DISPLAY) - pub const HEALTH_DATA_DISPLAY : i32 = 2332; + /// public static final [HEALTH_DATA_DISPLAY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_DATA_DISPLAY) + pub const HEALTH_DATA_DISPLAY: i32 = 2332; - /// public static final [HEALTH_GLUCOSE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_GLUCOSE) - pub const HEALTH_GLUCOSE : i32 = 2320; + /// public static final [HEALTH_GLUCOSE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_GLUCOSE) + pub const HEALTH_GLUCOSE: i32 = 2320; - /// public static final [HEALTH_PULSE_OXIMETER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_PULSE_OXIMETER) - pub const HEALTH_PULSE_OXIMETER : i32 = 2324; + /// public static final [HEALTH_PULSE_OXIMETER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_PULSE_OXIMETER) + pub const HEALTH_PULSE_OXIMETER: i32 = 2324; - /// public static final [HEALTH_PULSE_RATE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_PULSE_RATE) - pub const HEALTH_PULSE_RATE : i32 = 2328; + /// public static final [HEALTH_PULSE_RATE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_PULSE_RATE) + pub const HEALTH_PULSE_RATE: i32 = 2328; - /// public static final [HEALTH_THERMOMETER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_THERMOMETER) - pub const HEALTH_THERMOMETER : i32 = 2312; + /// public static final [HEALTH_THERMOMETER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_THERMOMETER) + pub const HEALTH_THERMOMETER: i32 = 2312; - /// public static final [HEALTH_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_UNCATEGORIZED) - pub const HEALTH_UNCATEGORIZED : i32 = 2304; + /// public static final [HEALTH_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_UNCATEGORIZED) + pub const HEALTH_UNCATEGORIZED: i32 = 2304; - /// public static final [HEALTH_WEIGHING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_WEIGHING) - pub const HEALTH_WEIGHING : i32 = 2316; + /// public static final [HEALTH_WEIGHING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#HEALTH_WEIGHING) + pub const HEALTH_WEIGHING: i32 = 2316; - /// public static final [PERIPHERAL_KEYBOARD](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PERIPHERAL_KEYBOARD) - pub const PERIPHERAL_KEYBOARD : i32 = 1344; + /// public static final [PERIPHERAL_KEYBOARD](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PERIPHERAL_KEYBOARD) + pub const PERIPHERAL_KEYBOARD: i32 = 1344; - /// public static final [PERIPHERAL_KEYBOARD_POINTING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PERIPHERAL_KEYBOARD_POINTING) - pub const PERIPHERAL_KEYBOARD_POINTING : i32 = 1472; + /// public static final [PERIPHERAL_KEYBOARD_POINTING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PERIPHERAL_KEYBOARD_POINTING) + pub const PERIPHERAL_KEYBOARD_POINTING: i32 = 1472; - /// public static final [PERIPHERAL_NON_KEYBOARD_NON_POINTING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PERIPHERAL_NON_KEYBOARD_NON_POINTING) - pub const PERIPHERAL_NON_KEYBOARD_NON_POINTING : i32 = 1280; + /// public static final [PERIPHERAL_NON_KEYBOARD_NON_POINTING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PERIPHERAL_NON_KEYBOARD_NON_POINTING) + pub const PERIPHERAL_NON_KEYBOARD_NON_POINTING: i32 = 1280; - /// public static final [PERIPHERAL_POINTING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PERIPHERAL_POINTING) - pub const PERIPHERAL_POINTING : i32 = 1408; + /// public static final [PERIPHERAL_POINTING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PERIPHERAL_POINTING) + pub const PERIPHERAL_POINTING: i32 = 1408; - /// public static final [PHONE_CELLULAR](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_CELLULAR) - pub const PHONE_CELLULAR : i32 = 516; + /// public static final [PHONE_CELLULAR](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_CELLULAR) + pub const PHONE_CELLULAR: i32 = 516; - /// public static final [PHONE_CORDLESS](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_CORDLESS) - pub const PHONE_CORDLESS : i32 = 520; + /// public static final [PHONE_CORDLESS](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_CORDLESS) + pub const PHONE_CORDLESS: i32 = 520; - /// public static final [PHONE_ISDN](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_ISDN) - pub const PHONE_ISDN : i32 = 532; + /// public static final [PHONE_ISDN](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_ISDN) + pub const PHONE_ISDN: i32 = 532; - /// public static final [PHONE_MODEM_OR_GATEWAY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_MODEM_OR_GATEWAY) - pub const PHONE_MODEM_OR_GATEWAY : i32 = 528; + /// public static final [PHONE_MODEM_OR_GATEWAY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_MODEM_OR_GATEWAY) + pub const PHONE_MODEM_OR_GATEWAY: i32 = 528; - /// public static final [PHONE_SMART](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_SMART) - pub const PHONE_SMART : i32 = 524; + /// public static final [PHONE_SMART](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_SMART) + pub const PHONE_SMART: i32 = 524; - /// public static final [PHONE_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_UNCATEGORIZED) - pub const PHONE_UNCATEGORIZED : i32 = 512; + /// public static final [PHONE_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#PHONE_UNCATEGORIZED) + pub const PHONE_UNCATEGORIZED: i32 = 512; - /// public static final [TOY_CONTROLLER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_CONTROLLER) - pub const TOY_CONTROLLER : i32 = 2064; + /// public static final [TOY_CONTROLLER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_CONTROLLER) + pub const TOY_CONTROLLER: i32 = 2064; - /// public static final [TOY_DOLL_ACTION_FIGURE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_DOLL_ACTION_FIGURE) - pub const TOY_DOLL_ACTION_FIGURE : i32 = 2060; + /// public static final [TOY_DOLL_ACTION_FIGURE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_DOLL_ACTION_FIGURE) + pub const TOY_DOLL_ACTION_FIGURE: i32 = 2060; - /// public static final [TOY_GAME](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_GAME) - pub const TOY_GAME : i32 = 2068; + /// public static final [TOY_GAME](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_GAME) + pub const TOY_GAME: i32 = 2068; - /// public static final [TOY_ROBOT](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_ROBOT) - pub const TOY_ROBOT : i32 = 2052; + /// public static final [TOY_ROBOT](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_ROBOT) + pub const TOY_ROBOT: i32 = 2052; - /// public static final [TOY_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_UNCATEGORIZED) - pub const TOY_UNCATEGORIZED : i32 = 2048; + /// public static final [TOY_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_UNCATEGORIZED) + pub const TOY_UNCATEGORIZED: i32 = 2048; - /// public static final [TOY_VEHICLE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_VEHICLE) - pub const TOY_VEHICLE : i32 = 2056; + /// public static final [TOY_VEHICLE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#TOY_VEHICLE) + pub const TOY_VEHICLE: i32 = 2056; - /// public static final [WEARABLE_GLASSES](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_GLASSES) - pub const WEARABLE_GLASSES : i32 = 1812; + /// public static final [WEARABLE_GLASSES](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_GLASSES) + pub const WEARABLE_GLASSES: i32 = 1812; - /// public static final [WEARABLE_HELMET](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_HELMET) - pub const WEARABLE_HELMET : i32 = 1808; + /// public static final [WEARABLE_HELMET](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_HELMET) + pub const WEARABLE_HELMET: i32 = 1808; - /// public static final [WEARABLE_JACKET](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_JACKET) - pub const WEARABLE_JACKET : i32 = 1804; + /// public static final [WEARABLE_JACKET](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_JACKET) + pub const WEARABLE_JACKET: i32 = 1804; - /// public static final [WEARABLE_PAGER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_PAGER) - pub const WEARABLE_PAGER : i32 = 1800; + /// public static final [WEARABLE_PAGER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_PAGER) + pub const WEARABLE_PAGER: i32 = 1800; - /// public static final [WEARABLE_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_UNCATEGORIZED) - pub const WEARABLE_UNCATEGORIZED : i32 = 1792; + /// public static final [WEARABLE_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_UNCATEGORIZED) + pub const WEARABLE_UNCATEGORIZED: i32 = 1792; - /// public static final [WEARABLE_WRIST_WATCH](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_WRIST_WATCH) - pub const WEARABLE_WRIST_WATCH : i32 = 1796; - } + /// public static final [WEARABLE_WRIST_WATCH](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#WEARABLE_WRIST_WATCH) + pub const WEARABLE_WRIST_WATCH: i32 = 1796; } - ::java_spaghetti::class! { - /// public class [BluetoothClass.Device.Major](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html) - public class BluetoothClass_Device_Major ("android/bluetooth/BluetoothClass$Device$Major\0") extends super::super::java::lang::Object { + /// pub class [BluetoothClass.Device.Major](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html) + #[repr(transparent)] + pub struct BluetoothClass_Device_Major(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothClass_Device_Major {} - /// [Major](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#Major()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothClass$Device$Major", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass$Device$Major\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothClass_Device_Major { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothClass$Device$Major\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothClass_Device_Major {} + impl ::std::ops::Deref for BluetoothClass_Device_Major { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothClass_Device_Major { + /// [Major](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#Major()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothClass$Device$Major", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothClass$Device$Major\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [AUDIO_VIDEO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#AUDIO_VIDEO) - pub const AUDIO_VIDEO : i32 = 1024; + /// public static final [AUDIO_VIDEO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#AUDIO_VIDEO) + pub const AUDIO_VIDEO: i32 = 1024; - /// public static final [COMPUTER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#COMPUTER) - pub const COMPUTER : i32 = 256; + /// public static final [COMPUTER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#COMPUTER) + pub const COMPUTER: i32 = 256; - /// public static final [HEALTH](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#HEALTH) - pub const HEALTH : i32 = 2304; + /// public static final [HEALTH](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#HEALTH) + pub const HEALTH: i32 = 2304; - /// public static final [IMAGING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#IMAGING) - pub const IMAGING : i32 = 1536; + /// public static final [IMAGING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#IMAGING) + pub const IMAGING: i32 = 1536; - /// public static final [MISC](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#MISC) - pub const MISC : i32 = 0; + /// public static final [MISC](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#MISC) + pub const MISC: i32 = 0; - /// public static final [NETWORKING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#NETWORKING) - pub const NETWORKING : i32 = 768; + /// public static final [NETWORKING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#NETWORKING) + pub const NETWORKING: i32 = 768; - /// public static final [PERIPHERAL](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#PERIPHERAL) - pub const PERIPHERAL : i32 = 1280; + /// public static final [PERIPHERAL](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#PERIPHERAL) + pub const PERIPHERAL: i32 = 1280; - /// public static final [PHONE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#PHONE) - pub const PHONE : i32 = 512; + /// public static final [PHONE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#PHONE) + pub const PHONE: i32 = 512; - /// public static final [TOY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#TOY) - pub const TOY : i32 = 2048; + /// public static final [TOY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#TOY) + pub const TOY: i32 = 2048; - /// public static final [UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#UNCATEGORIZED) - pub const UNCATEGORIZED : i32 = 7936; + /// public static final [UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#UNCATEGORIZED) + pub const UNCATEGORIZED: i32 = 7936; - /// public static final [WEARABLE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#WEARABLE) - pub const WEARABLE : i32 = 1792; - } + /// public static final [WEARABLE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.Major.html#WEARABLE) + pub const WEARABLE: i32 = 1792; } - ::java_spaghetti::class! { - /// public final class [BluetoothClass.Service](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html) - public final class BluetoothClass_Service ("android/bluetooth/BluetoothClass$Service\0") extends super::super::java::lang::Object { + /// pub final class [BluetoothClass.Service](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html) + #[repr(transparent)] + pub struct BluetoothClass_Service(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothClass_Service {} - /// [Service](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#Service()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothClass$Service", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothClass$Service\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothClass_Service { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothClass$Service\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothClass_Service {} + impl ::std::ops::Deref for BluetoothClass_Service { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothClass_Service { + /// [Service](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#Service()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothClass$Service", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothClass$Service\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#AUDIO) - pub const AUDIO : i32 = 2097152; + /// public static final [AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#AUDIO) + pub const AUDIO: i32 = 2097152; - /// public static final [CAPTURE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#CAPTURE) - pub const CAPTURE : i32 = 524288; + /// public static final [CAPTURE](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#CAPTURE) + pub const CAPTURE: i32 = 524288; - /// public static final [INFORMATION](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#INFORMATION) - pub const INFORMATION : i32 = 8388608; + /// public static final [INFORMATION](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#INFORMATION) + pub const INFORMATION: i32 = 8388608; - /// public static final [LE_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#LE_AUDIO) - pub const LE_AUDIO : i32 = 16384; + /// public static final [LE_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#LE_AUDIO) + pub const LE_AUDIO: i32 = 16384; - /// public static final [LIMITED_DISCOVERABILITY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#LIMITED_DISCOVERABILITY) - pub const LIMITED_DISCOVERABILITY : i32 = 8192; + /// public static final [LIMITED_DISCOVERABILITY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#LIMITED_DISCOVERABILITY) + pub const LIMITED_DISCOVERABILITY: i32 = 8192; - /// public static final [NETWORKING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#NETWORKING) - pub const NETWORKING : i32 = 131072; + /// public static final [NETWORKING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#NETWORKING) + pub const NETWORKING: i32 = 131072; - /// public static final [OBJECT_TRANSFER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#OBJECT_TRANSFER) - pub const OBJECT_TRANSFER : i32 = 1048576; + /// public static final [OBJECT_TRANSFER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#OBJECT_TRANSFER) + pub const OBJECT_TRANSFER: i32 = 1048576; - /// public static final [POSITIONING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#POSITIONING) - pub const POSITIONING : i32 = 65536; + /// public static final [POSITIONING](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#POSITIONING) + pub const POSITIONING: i32 = 65536; - /// public static final [RENDER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#RENDER) - pub const RENDER : i32 = 262144; + /// public static final [RENDER](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#RENDER) + pub const RENDER: i32 = 262144; - /// public static final [TELEPHONY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#TELEPHONY) - pub const TELEPHONY : i32 = 4194304; - } + /// public static final [TELEPHONY](https://developer.android.com/reference/android/bluetooth/BluetoothClass.Service.html#TELEPHONY) + pub const TELEPHONY: i32 = 4194304; } - ::java_spaghetti::class! { - /// public final class [BluetoothCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html) - public final class BluetoothCodecConfig ("android/bluetooth/BluetoothCodecConfig\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub final class [BluetoothCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html) + #[repr(transparent)] + pub struct BluetoothCodecConfig(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothCodecConfig {} - /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothCodecConfig { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothCodecConfig\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothCodecConfig {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothCodecConfig {} + impl ::std::ops::Deref for BluetoothCodecConfig { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothCodecConfig { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothCodecConfig { + /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "hashCode\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecType](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecType()) - pub fn getCodecType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "getCodecType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecType](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecType()) + pub fn getCodecType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "getCodecType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isMandatoryCodec](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#isMandatoryCodec()) - pub fn isMandatoryCodec<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "isMandatoryCodec", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "isMandatoryCodec\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isMandatoryCodec](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#isMandatoryCodec()) + pub fn isMandatoryCodec<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "isMandatoryCodec", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "isMandatoryCodec\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecPriority](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecPriority()) - pub fn getCodecPriority<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecPriority", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "getCodecPriority\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecPriority](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecPriority()) + pub fn getCodecPriority<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecPriority", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "getCodecPriority\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getSampleRate](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getSampleRate()) - pub fn getSampleRate<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getSampleRate", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "getSampleRate\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getSampleRate](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getSampleRate()) + pub fn getSampleRate<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getSampleRate", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "getSampleRate\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getBitsPerSample](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getBitsPerSample()) - pub fn getBitsPerSample<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getBitsPerSample", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "getBitsPerSample\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBitsPerSample](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getBitsPerSample()) + pub fn getBitsPerSample<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getBitsPerSample", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "getBitsPerSample\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getChannelMode](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getChannelMode()) - pub fn getChannelMode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getChannelMode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "getChannelMode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getChannelMode](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getChannelMode()) + pub fn getChannelMode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getChannelMode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "getChannelMode\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecSpecific1](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecSpecific1()) - pub fn getCodecSpecific1<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecSpecific1", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "getCodecSpecific1\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecSpecific1](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecSpecific1()) + pub fn getCodecSpecific1<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecSpecific1", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "getCodecSpecific1\0", + "()J\0", + ); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecSpecific2](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecSpecific2()) - pub fn getCodecSpecific2<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecSpecific2", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "getCodecSpecific2\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecSpecific2](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecSpecific2()) + pub fn getCodecSpecific2<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecSpecific2", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "getCodecSpecific2\0", + "()J\0", + ); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecSpecific3](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecSpecific3()) - pub fn getCodecSpecific3<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecSpecific3", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "getCodecSpecific3\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecSpecific3](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecSpecific3()) + pub fn getCodecSpecific3<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecSpecific3", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "getCodecSpecific3\0", + "()J\0", + ); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecSpecific4](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecSpecific4()) - pub fn getCodecSpecific4<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecSpecific4", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig\0", "getCodecSpecific4\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecSpecific4](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#getCodecSpecific4()) + pub fn getCodecSpecific4<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecConfig", java.flags == PUBLIC, .name == "getCodecSpecific4", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig\0", + "getCodecSpecific4\0", + "()J\0", + ); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [BITS_PER_SAMPLE_16](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#BITS_PER_SAMPLE_16) - pub const BITS_PER_SAMPLE_16 : i32 = 1; + /// public static final [BITS_PER_SAMPLE_16](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#BITS_PER_SAMPLE_16) + pub const BITS_PER_SAMPLE_16: i32 = 1; - /// public static final [BITS_PER_SAMPLE_24](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#BITS_PER_SAMPLE_24) - pub const BITS_PER_SAMPLE_24 : i32 = 2; + /// public static final [BITS_PER_SAMPLE_24](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#BITS_PER_SAMPLE_24) + pub const BITS_PER_SAMPLE_24: i32 = 2; - /// public static final [BITS_PER_SAMPLE_32](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#BITS_PER_SAMPLE_32) - pub const BITS_PER_SAMPLE_32 : i32 = 4; + /// public static final [BITS_PER_SAMPLE_32](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#BITS_PER_SAMPLE_32) + pub const BITS_PER_SAMPLE_32: i32 = 4; - /// public static final [BITS_PER_SAMPLE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#BITS_PER_SAMPLE_NONE) - pub const BITS_PER_SAMPLE_NONE : i32 = 0; + /// public static final [BITS_PER_SAMPLE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#BITS_PER_SAMPLE_NONE) + pub const BITS_PER_SAMPLE_NONE: i32 = 0; - /// public static final [CHANNEL_MODE_MONO](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CHANNEL_MODE_MONO) - pub const CHANNEL_MODE_MONO : i32 = 1; + /// public static final [CHANNEL_MODE_MONO](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CHANNEL_MODE_MONO) + pub const CHANNEL_MODE_MONO: i32 = 1; - /// public static final [CHANNEL_MODE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CHANNEL_MODE_NONE) - pub const CHANNEL_MODE_NONE : i32 = 0; + /// public static final [CHANNEL_MODE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CHANNEL_MODE_NONE) + pub const CHANNEL_MODE_NONE: i32 = 0; - /// public static final [CHANNEL_MODE_STEREO](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CHANNEL_MODE_STEREO) - pub const CHANNEL_MODE_STEREO : i32 = 2; + /// public static final [CHANNEL_MODE_STEREO](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CHANNEL_MODE_STEREO) + pub const CHANNEL_MODE_STEREO: i32 = 2; - /// public static final [CODEC_PRIORITY_DEFAULT](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CODEC_PRIORITY_DEFAULT) - pub const CODEC_PRIORITY_DEFAULT : i32 = 0; + /// public static final [CODEC_PRIORITY_DEFAULT](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CODEC_PRIORITY_DEFAULT) + pub const CODEC_PRIORITY_DEFAULT: i32 = 0; - /// public static final [CODEC_PRIORITY_DISABLED](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CODEC_PRIORITY_DISABLED) - pub const CODEC_PRIORITY_DISABLED : i32 = -1; + /// public static final [CODEC_PRIORITY_DISABLED](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CODEC_PRIORITY_DISABLED) + pub const CODEC_PRIORITY_DISABLED: i32 = -1; - /// public static final [CODEC_PRIORITY_HIGHEST](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CODEC_PRIORITY_HIGHEST) - pub const CODEC_PRIORITY_HIGHEST : i32 = 1000000; + /// public static final [CODEC_PRIORITY_HIGHEST](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#CODEC_PRIORITY_HIGHEST) + pub const CODEC_PRIORITY_HIGHEST: i32 = 1000000; - /// public static final [SAMPLE_RATE_176400](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_176400) - pub const SAMPLE_RATE_176400 : i32 = 16; + /// public static final [SAMPLE_RATE_176400](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_176400) + pub const SAMPLE_RATE_176400: i32 = 16; - /// public static final [SAMPLE_RATE_192000](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_192000) - pub const SAMPLE_RATE_192000 : i32 = 32; + /// public static final [SAMPLE_RATE_192000](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_192000) + pub const SAMPLE_RATE_192000: i32 = 32; - /// public static final [SAMPLE_RATE_44100](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_44100) - pub const SAMPLE_RATE_44100 : i32 = 1; + /// public static final [SAMPLE_RATE_44100](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_44100) + pub const SAMPLE_RATE_44100: i32 = 1; - /// public static final [SAMPLE_RATE_48000](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_48000) - pub const SAMPLE_RATE_48000 : i32 = 2; + /// public static final [SAMPLE_RATE_48000](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_48000) + pub const SAMPLE_RATE_48000: i32 = 2; - /// public static final [SAMPLE_RATE_88200](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_88200) - pub const SAMPLE_RATE_88200 : i32 = 4; + /// public static final [SAMPLE_RATE_88200](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_88200) + pub const SAMPLE_RATE_88200: i32 = 4; - /// public static final [SAMPLE_RATE_96000](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_96000) - pub const SAMPLE_RATE_96000 : i32 = 8; + /// public static final [SAMPLE_RATE_96000](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_96000) + pub const SAMPLE_RATE_96000: i32 = 8; - /// public static final [SAMPLE_RATE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_NONE) - pub const SAMPLE_RATE_NONE : i32 = 0; + /// public static final [SAMPLE_RATE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SAMPLE_RATE_NONE) + pub const SAMPLE_RATE_NONE: i32 = 0; - /// public static final [SOURCE_CODEC_TYPE_AAC](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_AAC) - pub const SOURCE_CODEC_TYPE_AAC : i32 = 1; + /// public static final [SOURCE_CODEC_TYPE_AAC](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_AAC) + pub const SOURCE_CODEC_TYPE_AAC: i32 = 1; - /// public static final [SOURCE_CODEC_TYPE_APTX](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_APTX) - pub const SOURCE_CODEC_TYPE_APTX : i32 = 2; + /// public static final [SOURCE_CODEC_TYPE_APTX](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_APTX) + pub const SOURCE_CODEC_TYPE_APTX: i32 = 2; - /// public static final [SOURCE_CODEC_TYPE_APTX_HD](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_APTX_HD) - pub const SOURCE_CODEC_TYPE_APTX_HD : i32 = 3; + /// public static final [SOURCE_CODEC_TYPE_APTX_HD](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_APTX_HD) + pub const SOURCE_CODEC_TYPE_APTX_HD: i32 = 3; - /// public static final [SOURCE_CODEC_TYPE_INVALID](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_INVALID) - pub const SOURCE_CODEC_TYPE_INVALID : i32 = 1000000; + /// public static final [SOURCE_CODEC_TYPE_INVALID](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_INVALID) + pub const SOURCE_CODEC_TYPE_INVALID: i32 = 1000000; - /// public static final [SOURCE_CODEC_TYPE_LC3](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_LC3) - pub const SOURCE_CODEC_TYPE_LC3 : i32 = 5; + /// public static final [SOURCE_CODEC_TYPE_LC3](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_LC3) + pub const SOURCE_CODEC_TYPE_LC3: i32 = 5; - /// public static final [SOURCE_CODEC_TYPE_LDAC](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_LDAC) - pub const SOURCE_CODEC_TYPE_LDAC : i32 = 4; + /// public static final [SOURCE_CODEC_TYPE_LDAC](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_LDAC) + pub const SOURCE_CODEC_TYPE_LDAC: i32 = 4; - /// public static final [SOURCE_CODEC_TYPE_SBC](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_SBC) - pub const SOURCE_CODEC_TYPE_SBC : i32 = 0; - } + /// public static final [SOURCE_CODEC_TYPE_SBC](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.html#SOURCE_CODEC_TYPE_SBC) + pub const SOURCE_CODEC_TYPE_SBC: i32 = 0; } - ::java_spaghetti::class! { - /// public final class [BluetoothCodecConfig.Builder](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html) - public final class BluetoothCodecConfig_Builder ("android/bluetooth/BluetoothCodecConfig$Builder\0") extends super::super::java::lang::Object { + /// pub final class [BluetoothCodecConfig.Builder](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html) + #[repr(transparent)] + pub struct BluetoothCodecConfig_Builder(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothCodecConfig_Builder {} - /// [Builder](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#Builder()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothCodecConfig_Builder { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothCodecConfig$Builder\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothCodecConfig_Builder {} + impl ::std::ops::Deref for BluetoothCodecConfig_Builder { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothCodecConfig_Builder { + /// [Builder](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#Builder()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecType](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecType(int)) - pub fn setCodecType<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecType", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "setCodecType\0", "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecType](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecType(int)) + pub fn setCodecType<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecType", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "setCodecType\0", + "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecPriority](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecPriority(int)) - pub fn setCodecPriority<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecPriority", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "setCodecPriority\0", "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecPriority](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecPriority(int)) + pub fn setCodecPriority<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecPriority", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "setCodecPriority\0", + "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setSampleRate](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setSampleRate(int)) - pub fn setSampleRate<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setSampleRate", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "setSampleRate\0", "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setSampleRate](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setSampleRate(int)) + pub fn setSampleRate<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setSampleRate", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "setSampleRate\0", + "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setBitsPerSample](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setBitsPerSample(int)) - pub fn setBitsPerSample<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setBitsPerSample", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "setBitsPerSample\0", "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setBitsPerSample](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setBitsPerSample(int)) + pub fn setBitsPerSample<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setBitsPerSample", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "setBitsPerSample\0", + "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setChannelMode](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setChannelMode(int)) - pub fn setChannelMode<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setChannelMode", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "setChannelMode\0", "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setChannelMode](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setChannelMode(int)) + pub fn setChannelMode<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setChannelMode", .descriptor == "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "setChannelMode\0", + "(I)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecSpecific1](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecSpecific1(long)) - pub fn setCodecSpecific1<'env>(&'env self, arg0: i64) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecSpecific1", .descriptor == "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "setCodecSpecific1\0", "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecSpecific1](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecSpecific1(long)) + pub fn setCodecSpecific1<'env>( + &'env self, + arg0: i64, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecSpecific1", .descriptor == "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "setCodecSpecific1\0", + "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecSpecific2](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecSpecific2(long)) - pub fn setCodecSpecific2<'env>(&'env self, arg0: i64) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecSpecific2", .descriptor == "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "setCodecSpecific2\0", "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecSpecific2](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecSpecific2(long)) + pub fn setCodecSpecific2<'env>( + &'env self, + arg0: i64, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecSpecific2", .descriptor == "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "setCodecSpecific2\0", + "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecSpecific3](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecSpecific3(long)) - pub fn setCodecSpecific3<'env>(&'env self, arg0: i64) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecSpecific3", .descriptor == "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "setCodecSpecific3\0", "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecSpecific3](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecSpecific3(long)) + pub fn setCodecSpecific3<'env>( + &'env self, + arg0: i64, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecSpecific3", .descriptor == "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "setCodecSpecific3\0", + "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecSpecific4](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecSpecific4(long)) - pub fn setCodecSpecific4<'env>(&'env self, arg0: i64) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecSpecific4", .descriptor == "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "setCodecSpecific4\0", "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecSpecific4](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#setCodecSpecific4(long)) + pub fn setCodecSpecific4<'env>( + &'env self, + arg0: i64, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecSpecific4", .descriptor == "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "setCodecSpecific4\0", + "(J)Landroid/bluetooth/BluetoothCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [build](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#build()) - pub fn build<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/BluetoothCodecConfig;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecConfig$Builder\0", "build\0", "()Landroid/bluetooth/BluetoothCodecConfig;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [build](https://developer.android.com/reference/android/bluetooth/BluetoothCodecConfig.Builder.html#build()) + pub fn build<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecConfig$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/BluetoothCodecConfig;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecConfig$Builder\0", + "build\0", + "()Landroid/bluetooth/BluetoothCodecConfig;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [BluetoothCodecStatus](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html) - public final class BluetoothCodecStatus ("android/bluetooth/BluetoothCodecStatus\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub final class [BluetoothCodecStatus](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html) + #[repr(transparent)] + pub struct BluetoothCodecStatus(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothCodecStatus {} - /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothCodecStatus { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothCodecStatus\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothCodecStatus {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothCodecStatus {} + impl ::std::ops::Deref for BluetoothCodecStatus { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothCodecStatus { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothCodecStatus { + /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isCodecConfigSelectable](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#isCodecConfigSelectable(android.bluetooth.BluetoothCodecConfig)) - pub fn isCodecConfigSelectable<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothCodecConfig>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "isCodecConfigSelectable", .descriptor == "(Landroid/bluetooth/BluetoothCodecConfig;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus\0", "isCodecConfigSelectable\0", "(Landroid/bluetooth/BluetoothCodecConfig;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isCodecConfigSelectable](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#isCodecConfigSelectable(android.bluetooth.BluetoothCodecConfig)) + pub fn isCodecConfigSelectable<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "isCodecConfigSelectable", .descriptor == "(Landroid/bluetooth/BluetoothCodecConfig;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus\0", + "isCodecConfigSelectable\0", + "(Landroid/bluetooth/BluetoothCodecConfig;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus\0", + "hashCode\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#getCodecConfig()) - pub fn getCodecConfig<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "getCodecConfig", .descriptor == "()Landroid/bluetooth/BluetoothCodecConfig;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus\0", "getCodecConfig\0", "()Landroid/bluetooth/BluetoothCodecConfig;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#getCodecConfig()) + pub fn getCodecConfig<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecConfig>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "getCodecConfig", .descriptor == "()Landroid/bluetooth/BluetoothCodecConfig;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus\0", + "getCodecConfig\0", + "()Landroid/bluetooth/BluetoothCodecConfig;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecsLocalCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#getCodecsLocalCapabilities()) - pub fn getCodecsLocalCapabilities<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "getCodecsLocalCapabilities", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus\0", "getCodecsLocalCapabilities\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecsLocalCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#getCodecsLocalCapabilities()) + pub fn getCodecsLocalCapabilities<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "getCodecsLocalCapabilities", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus\0", + "getCodecsLocalCapabilities\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecsSelectableCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#getCodecsSelectableCapabilities()) - pub fn getCodecsSelectableCapabilities<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "getCodecsSelectableCapabilities", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus\0", "getCodecsSelectableCapabilities\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecsSelectableCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#getCodecsSelectableCapabilities()) + pub fn getCodecsSelectableCapabilities<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecStatus", java.flags == PUBLIC, .name == "getCodecsSelectableCapabilities", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus\0", + "getCodecsSelectableCapabilities\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } - - /// public static final [EXTRA_CODEC_STATUS](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#EXTRA_CODEC_STATUS) - pub const EXTRA_CODEC_STATUS : &'static str = "android.bluetooth.extra.CODEC_STATUS"; } + + /// public static final [EXTRA_CODEC_STATUS](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.html#EXTRA_CODEC_STATUS) + pub const EXTRA_CODEC_STATUS: &'static str = "android.bluetooth.extra.CODEC_STATUS"; } - ::java_spaghetti::class! { - /// public final class [BluetoothCodecStatus.Builder](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html) - public final class BluetoothCodecStatus_Builder ("android/bluetooth/BluetoothCodecStatus$Builder\0") extends super::super::java::lang::Object { + /// pub final class [BluetoothCodecStatus.Builder](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html) + #[repr(transparent)] + pub struct BluetoothCodecStatus_Builder(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothCodecStatus_Builder {} - /// [Builder](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#Builder()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus$Builder\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothCodecStatus_Builder { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothCodecStatus$Builder\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothCodecStatus_Builder {} + impl ::std::ops::Deref for BluetoothCodecStatus_Builder { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothCodecStatus_Builder { + /// [Builder](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#Builder()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus$Builder\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#setCodecConfig(android.bluetooth.BluetoothCodecConfig)) - pub fn setCodecConfig<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothCodecConfig>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecStatus_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "setCodecConfig", .descriptor == "(Landroid/bluetooth/BluetoothCodecConfig;)Landroid/bluetooth/BluetoothCodecStatus$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus$Builder\0", "setCodecConfig\0", "(Landroid/bluetooth/BluetoothCodecConfig;)Landroid/bluetooth/BluetoothCodecStatus$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#setCodecConfig(android.bluetooth.BluetoothCodecConfig)) + pub fn setCodecConfig<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecStatus_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "setCodecConfig", .descriptor == "(Landroid/bluetooth/BluetoothCodecConfig;)Landroid/bluetooth/BluetoothCodecStatus$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus$Builder\0", + "setCodecConfig\0", + "(Landroid/bluetooth/BluetoothCodecConfig;)Landroid/bluetooth/BluetoothCodecStatus$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecsLocalCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#setCodecsLocalCapabilities(java.util.List)) - pub fn setCodecsLocalCapabilities<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::List>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecStatus_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "setCodecsLocalCapabilities", .descriptor == "(Ljava/util/List;)Landroid/bluetooth/BluetoothCodecStatus$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus$Builder\0", "setCodecsLocalCapabilities\0", "(Ljava/util/List;)Landroid/bluetooth/BluetoothCodecStatus$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecsLocalCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#setCodecsLocalCapabilities(java.util.List)) + pub fn setCodecsLocalCapabilities<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecStatus_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "setCodecsLocalCapabilities", .descriptor == "(Ljava/util/List;)Landroid/bluetooth/BluetoothCodecStatus$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus$Builder\0", + "setCodecsLocalCapabilities\0", + "(Ljava/util/List;)Landroid/bluetooth/BluetoothCodecStatus$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecsSelectableCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#setCodecsSelectableCapabilities(java.util.List)) - pub fn setCodecsSelectableCapabilities<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::List>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecStatus_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "setCodecsSelectableCapabilities", .descriptor == "(Ljava/util/List;)Landroid/bluetooth/BluetoothCodecStatus$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus$Builder\0", "setCodecsSelectableCapabilities\0", "(Ljava/util/List;)Landroid/bluetooth/BluetoothCodecStatus$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecsSelectableCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#setCodecsSelectableCapabilities(java.util.List)) + pub fn setCodecsSelectableCapabilities<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecStatus_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "setCodecsSelectableCapabilities", .descriptor == "(Ljava/util/List;)Landroid/bluetooth/BluetoothCodecStatus$Builder;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus$Builder\0", + "setCodecsSelectableCapabilities\0", + "(Ljava/util/List;)Landroid/bluetooth/BluetoothCodecStatus$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [build](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#build()) - pub fn build<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecStatus>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/BluetoothCodecStatus;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCodecStatus$Builder\0", "build\0", "()Landroid/bluetooth/BluetoothCodecStatus;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [build](https://developer.android.com/reference/android/bluetooth/BluetoothCodecStatus.Builder.html#build()) + pub fn build<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothCodecStatus>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCodecStatus$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/BluetoothCodecStatus;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCodecStatus$Builder\0", + "build\0", + "()Landroid/bluetooth/BluetoothCodecStatus;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [BluetoothCsipSetCoordinator](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html) - public final class BluetoothCsipSetCoordinator ("android/bluetooth/BluetoothCsipSetCoordinator\0") extends super::super::java::lang::Object, implements BluetoothProfile { + /// pub final class [BluetoothCsipSetCoordinator](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html) + #[repr(transparent)] + pub struct BluetoothCsipSetCoordinator(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothCsipSetCoordinator {} - /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#close()) - pub fn close<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCsipSetCoordinator", java.flags == PUBLIC, .name == "close", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCsipSetCoordinator\0", "close\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothCsipSetCoordinator { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothCsipSetCoordinator\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothCsipSetCoordinator {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothCsipSetCoordinator {} + impl ::std::ops::Deref for BluetoothCsipSetCoordinator { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothCsipSetCoordinator { + fn as_ref(&self) -> &BluetoothProfile { + unsafe { &*(self as *const Self as *const BluetoothProfile) } + } + } + impl BluetoothCsipSetCoordinator { + /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#close()) + pub fn close<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothCsipSetCoordinator", java.flags == PUBLIC, .name == "close", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCsipSetCoordinator\0", + "close\0", + "()V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#getConnectedDevices()) - pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCsipSetCoordinator", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCsipSetCoordinator\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#getConnectedDevices()) + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCsipSetCoordinator", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCsipSetCoordinator\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#getDevicesMatchingConnectionStates(int%5B%5D)) - pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothCsipSetCoordinator", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCsipSetCoordinator\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#getDevicesMatchingConnectionStates(int%5B%5D)) + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothCsipSetCoordinator", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCsipSetCoordinator\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#getConnectionState(android.bluetooth.BluetoothDevice)) - pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothCsipSetCoordinator", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothCsipSetCoordinator\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#getConnectionState(android.bluetooth.BluetoothDevice)) + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothCsipSetCoordinator", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothCsipSetCoordinator\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } - - /// public static final [ACTION_CSIS_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#ACTION_CSIS_CONNECTION_STATE_CHANGED) - pub const ACTION_CSIS_CONNECTION_STATE_CHANGED : &'static str = "android.bluetooth.action.CSIS_CONNECTION_STATE_CHANGED"; } + + /// public static final [ACTION_CSIS_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothCsipSetCoordinator.html#ACTION_CSIS_CONNECTION_STATE_CHANGED) + pub const ACTION_CSIS_CONNECTION_STATE_CHANGED: &'static str = + "android.bluetooth.action.CSIS_CONNECTION_STATE_CHANGED"; } - ::java_spaghetti::class! { - /// public final class [BluetoothDevice](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html) - public final class BluetoothDevice ("android/bluetooth/BluetoothDevice\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub final class [BluetoothDevice](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html) + #[repr(transparent)] + pub struct BluetoothDevice(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothDevice {} - /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothDevice { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothDevice\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothDevice {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothDevice {} + impl ::std::ops::Deref for BluetoothDevice { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothDevice { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothDevice { + /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } - } - - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getAddress](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getAddress()) - pub fn getAddress<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getAddress", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "getAddress\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getName](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getName()) - pub fn getName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getName", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "getName\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getAddress](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getAddress()) + pub fn getAddress<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getAddress", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "getAddress\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getType](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getType()) - pub fn getType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "getType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getName](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getName()) + pub fn getName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "getName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getAlias](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getAlias()) - pub fn getAlias<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getAlias", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "getAlias\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getType](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getType()) + pub fn getType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "getType\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setAlias](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#setAlias(java.lang.String)) - pub fn setAlias<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "setAlias", .descriptor == "(Ljava/lang/String;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "setAlias\0", "(Ljava/lang/String;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getAlias](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getAlias()) + pub fn getAlias<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getAlias", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "getAlias\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [createBond](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createBond()) - pub fn createBond<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createBond", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "createBond\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setAlias](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#setAlias(java.lang.String)) + pub fn setAlias<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "setAlias", .descriptor == "(Ljava/lang/String;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "setAlias\0", + "(Ljava/lang/String;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getBondState](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getBondState()) - pub fn getBondState<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getBondState", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "getBondState\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [createBond](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createBond()) + pub fn createBond<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createBond", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "createBond\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getBluetoothClass](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getBluetoothClass()) - pub fn getBluetoothClass<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothClass>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getBluetoothClass", .descriptor == "()Landroid/bluetooth/BluetoothClass;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "getBluetoothClass\0", "()Landroid/bluetooth/BluetoothClass;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBondState](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getBondState()) + pub fn getBondState<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getBondState", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "getBondState\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getUuids](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getUuids()) - pub fn getUuids<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getUuids", .descriptor == "()[Landroid/os/ParcelUuid;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "getUuids\0", "()[Landroid/os/ParcelUuid;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBluetoothClass](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getBluetoothClass()) + pub fn getBluetoothClass<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothClass>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getBluetoothClass", .descriptor == "()Landroid/bluetooth/BluetoothClass;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "getBluetoothClass\0", + "()Landroid/bluetooth/BluetoothClass;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [fetchUuidsWithSdp](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#fetchUuidsWithSdp()) - pub fn fetchUuidsWithSdp<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "fetchUuidsWithSdp", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "fetchUuidsWithSdp\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getUuids](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getUuids()) + pub fn getUuids<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option< + ::java_spaghetti::Local< + 'env, + ::java_spaghetti::ObjectArray, + >, + >, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "getUuids", .descriptor == "()[Landroid/os/ParcelUuid;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "getUuids\0", + "()[Landroid/os/ParcelUuid;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setPin](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#setPin(byte%5B%5D)) - pub fn setPin<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "setPin", .descriptor == "([B)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "setPin\0", "([B)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [fetchUuidsWithSdp](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#fetchUuidsWithSdp()) + pub fn fetchUuidsWithSdp<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "fetchUuidsWithSdp", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "fetchUuidsWithSdp\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setPairingConfirmation](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#setPairingConfirmation(boolean)) - pub fn setPairingConfirmation<'env>(&'env self, arg0: bool) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "setPairingConfirmation", .descriptor == "(Z)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "setPairingConfirmation\0", "(Z)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setPin](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#setPin(byte%5B%5D)) + pub fn setPin<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "setPin", .descriptor == "([B)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "setPin\0", "([B)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [createRfcommSocketToServiceRecord](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createRfcommSocketToServiceRecord(java.util.UUID)) - pub fn createRfcommSocketToServiceRecord<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createRfcommSocketToServiceRecord", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothSocket;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "createRfcommSocketToServiceRecord\0", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setPairingConfirmation](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#setPairingConfirmation(boolean)) + pub fn setPairingConfirmation<'env>( + &'env self, + arg0: bool, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "setPairingConfirmation", .descriptor == "(Z)Z" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "setPairingConfirmation\0", + "(Z)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [createInsecureRfcommSocketToServiceRecord](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createInsecureRfcommSocketToServiceRecord(java.util.UUID)) - pub fn createInsecureRfcommSocketToServiceRecord<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createInsecureRfcommSocketToServiceRecord", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothSocket;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "createInsecureRfcommSocketToServiceRecord\0", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [createRfcommSocketToServiceRecord](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createRfcommSocketToServiceRecord(java.util.UUID)) + pub fn createRfcommSocketToServiceRecord<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createRfcommSocketToServiceRecord", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothSocket;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "createRfcommSocketToServiceRecord\0", + "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [createL2capChannel](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createL2capChannel(int)) - pub fn createL2capChannel<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createL2capChannel", .descriptor == "(I)Landroid/bluetooth/BluetoothSocket;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "createL2capChannel\0", "(I)Landroid/bluetooth/BluetoothSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [createInsecureRfcommSocketToServiceRecord](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createInsecureRfcommSocketToServiceRecord(java.util.UUID)) + pub fn createInsecureRfcommSocketToServiceRecord<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createInsecureRfcommSocketToServiceRecord", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothSocket;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "createInsecureRfcommSocketToServiceRecord\0", + "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [createInsecureL2capChannel](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createInsecureL2capChannel(int)) - pub fn createInsecureL2capChannel<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createInsecureL2capChannel", .descriptor == "(I)Landroid/bluetooth/BluetoothSocket;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothDevice\0", "createInsecureL2capChannel\0", "(I)Landroid/bluetooth/BluetoothSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [createL2capChannel](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createL2capChannel(int)) + pub fn createL2capChannel<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createL2capChannel", .descriptor == "(I)Landroid/bluetooth/BluetoothSocket;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "createL2capChannel\0", + "(I)Landroid/bluetooth/BluetoothSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [ACTION_ACL_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_ACL_CONNECTED) - pub const ACTION_ACL_CONNECTED : &'static str = "android.bluetooth.device.action.ACL_CONNECTED"; + /// [createInsecureL2capChannel](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createInsecureL2capChannel(int)) + pub fn createInsecureL2capChannel<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothDevice", java.flags == PUBLIC, .name == "createInsecureL2capChannel", .descriptor == "(I)Landroid/bluetooth/BluetoothSocket;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothDevice\0", + "createInsecureL2capChannel\0", + "(I)Landroid/bluetooth/BluetoothSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) + } + } - /// public static final [ACTION_ACL_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_ACL_DISCONNECTED) - pub const ACTION_ACL_DISCONNECTED : &'static str = "android.bluetooth.device.action.ACL_DISCONNECTED"; + /// public static final [ACTION_ACL_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_ACL_CONNECTED) + pub const ACTION_ACL_CONNECTED: &'static str = "android.bluetooth.device.action.ACL_CONNECTED"; - /// public static final [ACTION_ACL_DISCONNECT_REQUESTED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_ACL_DISCONNECT_REQUESTED) - pub const ACTION_ACL_DISCONNECT_REQUESTED : &'static str = "android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED"; + /// public static final [ACTION_ACL_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_ACL_DISCONNECTED) + pub const ACTION_ACL_DISCONNECTED: &'static str = "android.bluetooth.device.action.ACL_DISCONNECTED"; - /// public static final [ACTION_ALIAS_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_ALIAS_CHANGED) - pub const ACTION_ALIAS_CHANGED : &'static str = "android.bluetooth.device.action.ALIAS_CHANGED"; + /// public static final [ACTION_ACL_DISCONNECT_REQUESTED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_ACL_DISCONNECT_REQUESTED) + pub const ACTION_ACL_DISCONNECT_REQUESTED: &'static str = + "android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED"; - /// public static final [ACTION_BOND_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_BOND_STATE_CHANGED) - pub const ACTION_BOND_STATE_CHANGED : &'static str = "android.bluetooth.device.action.BOND_STATE_CHANGED"; + /// public static final [ACTION_ALIAS_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_ALIAS_CHANGED) + pub const ACTION_ALIAS_CHANGED: &'static str = "android.bluetooth.device.action.ALIAS_CHANGED"; - /// public static final [ACTION_CLASS_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_CLASS_CHANGED) - pub const ACTION_CLASS_CHANGED : &'static str = "android.bluetooth.device.action.CLASS_CHANGED"; + /// public static final [ACTION_BOND_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_BOND_STATE_CHANGED) + pub const ACTION_BOND_STATE_CHANGED: &'static str = "android.bluetooth.device.action.BOND_STATE_CHANGED"; - /// public static final [ACTION_FOUND](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_FOUND) - pub const ACTION_FOUND : &'static str = "android.bluetooth.device.action.FOUND"; + /// public static final [ACTION_CLASS_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_CLASS_CHANGED) + pub const ACTION_CLASS_CHANGED: &'static str = "android.bluetooth.device.action.CLASS_CHANGED"; - /// public static final [ACTION_NAME_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_NAME_CHANGED) - pub const ACTION_NAME_CHANGED : &'static str = "android.bluetooth.device.action.NAME_CHANGED"; + /// public static final [ACTION_FOUND](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_FOUND) + pub const ACTION_FOUND: &'static str = "android.bluetooth.device.action.FOUND"; - /// public static final [ACTION_PAIRING_REQUEST](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_PAIRING_REQUEST) - pub const ACTION_PAIRING_REQUEST : &'static str = "android.bluetooth.device.action.PAIRING_REQUEST"; + /// public static final [ACTION_NAME_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_NAME_CHANGED) + pub const ACTION_NAME_CHANGED: &'static str = "android.bluetooth.device.action.NAME_CHANGED"; - /// public static final [ACTION_UUID](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_UUID) - pub const ACTION_UUID : &'static str = "android.bluetooth.device.action.UUID"; + /// public static final [ACTION_PAIRING_REQUEST](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_PAIRING_REQUEST) + pub const ACTION_PAIRING_REQUEST: &'static str = "android.bluetooth.device.action.PAIRING_REQUEST"; - /// public static final [ADDRESS_TYPE_PUBLIC](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ADDRESS_TYPE_PUBLIC) - pub const ADDRESS_TYPE_PUBLIC : i32 = 0; + /// public static final [ACTION_UUID](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ACTION_UUID) + pub const ACTION_UUID: &'static str = "android.bluetooth.device.action.UUID"; - /// public static final [ADDRESS_TYPE_RANDOM](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ADDRESS_TYPE_RANDOM) - pub const ADDRESS_TYPE_RANDOM : i32 = 1; + /// public static final [ADDRESS_TYPE_PUBLIC](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ADDRESS_TYPE_PUBLIC) + pub const ADDRESS_TYPE_PUBLIC: i32 = 0; - /// public static final [ADDRESS_TYPE_UNKNOWN](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ADDRESS_TYPE_UNKNOWN) - pub const ADDRESS_TYPE_UNKNOWN : i32 = 65535; + /// public static final [ADDRESS_TYPE_RANDOM](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ADDRESS_TYPE_RANDOM) + pub const ADDRESS_TYPE_RANDOM: i32 = 1; - /// public static final [BOND_BONDED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#BOND_BONDED) - pub const BOND_BONDED : i32 = 12; + /// public static final [ADDRESS_TYPE_UNKNOWN](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ADDRESS_TYPE_UNKNOWN) + pub const ADDRESS_TYPE_UNKNOWN: i32 = 65535; - /// public static final [BOND_BONDING](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#BOND_BONDING) - pub const BOND_BONDING : i32 = 11; + /// public static final [BOND_BONDED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#BOND_BONDED) + pub const BOND_BONDED: i32 = 12; - /// public static final [BOND_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#BOND_NONE) - pub const BOND_NONE : i32 = 10; + /// public static final [BOND_BONDING](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#BOND_BONDING) + pub const BOND_BONDING: i32 = 11; - /// public static final [DEVICE_TYPE_CLASSIC](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#DEVICE_TYPE_CLASSIC) - pub const DEVICE_TYPE_CLASSIC : i32 = 1; + /// public static final [BOND_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#BOND_NONE) + pub const BOND_NONE: i32 = 10; - /// public static final [DEVICE_TYPE_DUAL](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#DEVICE_TYPE_DUAL) - pub const DEVICE_TYPE_DUAL : i32 = 3; + /// public static final [DEVICE_TYPE_CLASSIC](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#DEVICE_TYPE_CLASSIC) + pub const DEVICE_TYPE_CLASSIC: i32 = 1; - /// public static final [DEVICE_TYPE_LE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#DEVICE_TYPE_LE) - pub const DEVICE_TYPE_LE : i32 = 2; + /// public static final [DEVICE_TYPE_DUAL](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#DEVICE_TYPE_DUAL) + pub const DEVICE_TYPE_DUAL: i32 = 3; - /// public static final [DEVICE_TYPE_UNKNOWN](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#DEVICE_TYPE_UNKNOWN) - pub const DEVICE_TYPE_UNKNOWN : i32 = 0; + /// public static final [DEVICE_TYPE_LE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#DEVICE_TYPE_LE) + pub const DEVICE_TYPE_LE: i32 = 2; - /// public static final [ERROR](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ERROR) - pub const ERROR : i32 = -2147483648; + /// public static final [DEVICE_TYPE_UNKNOWN](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#DEVICE_TYPE_UNKNOWN) + pub const DEVICE_TYPE_UNKNOWN: i32 = 0; - /// public static final [EXTRA_BOND_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_BOND_STATE) - pub const EXTRA_BOND_STATE : &'static str = "android.bluetooth.device.extra.BOND_STATE"; + /// public static final [ERROR](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#ERROR) + pub const ERROR: i32 = -2147483648; - /// public static final [EXTRA_CLASS](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_CLASS) - pub const EXTRA_CLASS : &'static str = "android.bluetooth.device.extra.CLASS"; + /// public static final [EXTRA_BOND_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_BOND_STATE) + pub const EXTRA_BOND_STATE: &'static str = "android.bluetooth.device.extra.BOND_STATE"; - /// public static final [EXTRA_DEVICE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_DEVICE) - pub const EXTRA_DEVICE : &'static str = "android.bluetooth.device.extra.DEVICE"; + /// public static final [EXTRA_CLASS](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_CLASS) + pub const EXTRA_CLASS: &'static str = "android.bluetooth.device.extra.CLASS"; - /// public static final [EXTRA_IS_COORDINATED_SET_MEMBER](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_IS_COORDINATED_SET_MEMBER) - pub const EXTRA_IS_COORDINATED_SET_MEMBER : &'static str = "android.bluetooth.extra.IS_COORDINATED_SET_MEMBER"; + /// public static final [EXTRA_DEVICE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_DEVICE) + pub const EXTRA_DEVICE: &'static str = "android.bluetooth.device.extra.DEVICE"; - /// public static final [EXTRA_NAME](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_NAME) - pub const EXTRA_NAME : &'static str = "android.bluetooth.device.extra.NAME"; + /// public static final [EXTRA_IS_COORDINATED_SET_MEMBER](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_IS_COORDINATED_SET_MEMBER) + pub const EXTRA_IS_COORDINATED_SET_MEMBER: &'static str = + "android.bluetooth.extra.IS_COORDINATED_SET_MEMBER"; - /// public static final [EXTRA_PAIRING_KEY](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_PAIRING_KEY) - pub const EXTRA_PAIRING_KEY : &'static str = "android.bluetooth.device.extra.PAIRING_KEY"; + /// public static final [EXTRA_NAME](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_NAME) + pub const EXTRA_NAME: &'static str = "android.bluetooth.device.extra.NAME"; - /// public static final [EXTRA_PAIRING_VARIANT](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_PAIRING_VARIANT) - pub const EXTRA_PAIRING_VARIANT : &'static str = "android.bluetooth.device.extra.PAIRING_VARIANT"; + /// public static final [EXTRA_PAIRING_KEY](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_PAIRING_KEY) + pub const EXTRA_PAIRING_KEY: &'static str = "android.bluetooth.device.extra.PAIRING_KEY"; - /// public static final [EXTRA_PREVIOUS_BOND_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_PREVIOUS_BOND_STATE) - pub const EXTRA_PREVIOUS_BOND_STATE : &'static str = "android.bluetooth.device.extra.PREVIOUS_BOND_STATE"; + /// public static final [EXTRA_PAIRING_VARIANT](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_PAIRING_VARIANT) + pub const EXTRA_PAIRING_VARIANT: &'static str = "android.bluetooth.device.extra.PAIRING_VARIANT"; - /// public static final [EXTRA_RSSI](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_RSSI) - pub const EXTRA_RSSI : &'static str = "android.bluetooth.device.extra.RSSI"; + /// public static final [EXTRA_PREVIOUS_BOND_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_PREVIOUS_BOND_STATE) + pub const EXTRA_PREVIOUS_BOND_STATE: &'static str = "android.bluetooth.device.extra.PREVIOUS_BOND_STATE"; - /// public static final [EXTRA_TRANSPORT](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_TRANSPORT) - pub const EXTRA_TRANSPORT : &'static str = "android.bluetooth.device.extra.TRANSPORT"; + /// public static final [EXTRA_RSSI](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_RSSI) + pub const EXTRA_RSSI: &'static str = "android.bluetooth.device.extra.RSSI"; - /// public static final [EXTRA_UUID](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_UUID) - pub const EXTRA_UUID : &'static str = "android.bluetooth.device.extra.UUID"; + /// public static final [EXTRA_TRANSPORT](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_TRANSPORT) + pub const EXTRA_TRANSPORT: &'static str = "android.bluetooth.device.extra.TRANSPORT"; - /// public static final [PAIRING_VARIANT_PASSKEY_CONFIRMATION](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PAIRING_VARIANT_PASSKEY_CONFIRMATION) - pub const PAIRING_VARIANT_PASSKEY_CONFIRMATION : i32 = 2; + /// public static final [EXTRA_UUID](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#EXTRA_UUID) + pub const EXTRA_UUID: &'static str = "android.bluetooth.device.extra.UUID"; - /// public static final [PAIRING_VARIANT_PIN](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PAIRING_VARIANT_PIN) - pub const PAIRING_VARIANT_PIN : i32 = 0; + /// public static final [PAIRING_VARIANT_PASSKEY_CONFIRMATION](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PAIRING_VARIANT_PASSKEY_CONFIRMATION) + pub const PAIRING_VARIANT_PASSKEY_CONFIRMATION: i32 = 2; - /// public static final [PHY_LE_1M](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_1M) - pub const PHY_LE_1M : i32 = 1; + /// public static final [PAIRING_VARIANT_PIN](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PAIRING_VARIANT_PIN) + pub const PAIRING_VARIANT_PIN: i32 = 0; - /// public static final [PHY_LE_1M_MASK](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_1M_MASK) - pub const PHY_LE_1M_MASK : i32 = 1; + /// public static final [PHY_LE_1M](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_1M) + pub const PHY_LE_1M: i32 = 1; - /// public static final [PHY_LE_2M](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_2M) - pub const PHY_LE_2M : i32 = 2; + /// public static final [PHY_LE_1M_MASK](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_1M_MASK) + pub const PHY_LE_1M_MASK: i32 = 1; - /// public static final [PHY_LE_2M_MASK](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_2M_MASK) - pub const PHY_LE_2M_MASK : i32 = 2; + /// public static final [PHY_LE_2M](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_2M) + pub const PHY_LE_2M: i32 = 2; - /// public static final [PHY_LE_CODED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_CODED) - pub const PHY_LE_CODED : i32 = 3; + /// public static final [PHY_LE_2M_MASK](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_2M_MASK) + pub const PHY_LE_2M_MASK: i32 = 2; - /// public static final [PHY_LE_CODED_MASK](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_CODED_MASK) - pub const PHY_LE_CODED_MASK : i32 = 4; + /// public static final [PHY_LE_CODED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_CODED) + pub const PHY_LE_CODED: i32 = 3; - /// public static final [PHY_OPTION_NO_PREFERRED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_OPTION_NO_PREFERRED) - pub const PHY_OPTION_NO_PREFERRED : i32 = 0; + /// public static final [PHY_LE_CODED_MASK](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_LE_CODED_MASK) + pub const PHY_LE_CODED_MASK: i32 = 4; - /// public static final [PHY_OPTION_S2](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_OPTION_S2) - pub const PHY_OPTION_S2 : i32 = 1; + /// public static final [PHY_OPTION_NO_PREFERRED](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_OPTION_NO_PREFERRED) + pub const PHY_OPTION_NO_PREFERRED: i32 = 0; - /// public static final [PHY_OPTION_S8](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_OPTION_S8) - pub const PHY_OPTION_S8 : i32 = 2; + /// public static final [PHY_OPTION_S2](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_OPTION_S2) + pub const PHY_OPTION_S2: i32 = 1; - /// public static final [TRANSPORT_AUTO](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#TRANSPORT_AUTO) - pub const TRANSPORT_AUTO : i32 = 0; + /// public static final [PHY_OPTION_S8](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#PHY_OPTION_S8) + pub const PHY_OPTION_S8: i32 = 2; - /// public static final [TRANSPORT_BREDR](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#TRANSPORT_BREDR) - pub const TRANSPORT_BREDR : i32 = 1; + /// public static final [TRANSPORT_AUTO](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#TRANSPORT_AUTO) + pub const TRANSPORT_AUTO: i32 = 0; - /// public static final [TRANSPORT_LE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#TRANSPORT_LE) - pub const TRANSPORT_LE : i32 = 2; - } + /// public static final [TRANSPORT_BREDR](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#TRANSPORT_BREDR) + pub const TRANSPORT_BREDR: i32 = 1; + + /// public static final [TRANSPORT_LE](https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#TRANSPORT_LE) + pub const TRANSPORT_LE: i32 = 2; } - ::java_spaghetti::class! { - /// public final class [BluetoothGatt](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html) - public final class BluetoothGatt ("android/bluetooth/BluetoothGatt\0") extends super::super::java::lang::Object, implements BluetoothProfile { + /// pub final class [BluetoothGatt](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html) + #[repr(transparent)] + pub struct BluetoothGatt(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothGatt {} - /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#close()) - pub fn close<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "close", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "close\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothGatt { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothGatt\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGatt {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGatt {} + impl ::std::ops::Deref for BluetoothGatt { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothGatt { + fn as_ref(&self) -> &BluetoothProfile { + unsafe { &*(self as *const Self as *const BluetoothProfile) } + } + } + impl BluetoothGatt { + /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#close()) + pub fn close<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "close", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "close\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [disconnect](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#disconnect()) - pub fn disconnect<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "disconnect", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "disconnect\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [disconnect](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#disconnect()) + pub fn disconnect<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "disconnect", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "disconnect\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [connect](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#connect()) - pub fn connect<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "connect", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "connect\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [connect](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#connect()) + pub fn connect<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "connect", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "connect\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setPreferredPhy](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#setPreferredPhy(int,%20int,%20int)) - pub fn setPreferredPhy<'env>(&'env self, arg0: i32, arg1: i32, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "setPreferredPhy", .descriptor == "(III)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "setPreferredPhy\0", "(III)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setPreferredPhy](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#setPreferredPhy(int,%20int,%20int)) + pub fn setPreferredPhy<'env>( + &'env self, + arg0: i32, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "setPreferredPhy", .descriptor == "(III)V" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "setPreferredPhy\0", + "(III)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [readPhy](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#readPhy()) - pub fn readPhy<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "readPhy", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "readPhy\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [readPhy](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#readPhy()) + pub fn readPhy<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "readPhy", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "readPhy\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevice](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getDevice()) - pub fn getDevice<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getDevice", .descriptor == "()Landroid/bluetooth/BluetoothDevice;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "getDevice\0", "()Landroid/bluetooth/BluetoothDevice;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevice](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getDevice()) + pub fn getDevice<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getDevice", .descriptor == "()Landroid/bluetooth/BluetoothDevice;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "getDevice\0", + "()Landroid/bluetooth/BluetoothDevice;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [discoverServices](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#discoverServices()) - pub fn discoverServices<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "discoverServices", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "discoverServices\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [discoverServices](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#discoverServices()) + pub fn discoverServices<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "discoverServices", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "discoverServices\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServices](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getServices()) - pub fn getServices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getServices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "getServices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServices](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getServices()) + pub fn getServices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getServices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "getServices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getService](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getService(java.util.UUID)) - pub fn getService<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattService>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getService", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "getService\0", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getService](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getService(java.util.UUID)) + pub fn getService<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattService>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getService", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "getService\0", + "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [readCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)) - pub fn readCharacteristic<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "readCharacteristic", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "readCharacteristic\0", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [readCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)) + pub fn readCharacteristic<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "readCharacteristic", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "readCharacteristic\0", + "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [writeCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic)) - #[deprecated] pub fn writeCharacteristic_BluetoothGattCharacteristic<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "writeCharacteristic", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "writeCharacteristic\0", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [writeCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic)) + #[deprecated] + pub fn writeCharacteristic_BluetoothGattCharacteristic<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "writeCharacteristic", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "writeCharacteristic\0", + "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [writeCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte%5B%5D,%20int)) - pub fn writeCharacteristic_BluetoothGattCharacteristic_byte_array_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg2: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "writeCharacteristic", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;[BI)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "writeCharacteristic\0", "(Landroid/bluetooth/BluetoothGattCharacteristic;[BI)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [writeCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte%5B%5D,%20int)) + pub fn writeCharacteristic_BluetoothGattCharacteristic_byte_array_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg2: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "writeCharacteristic", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;[BI)I" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "writeCharacteristic\0", + "(Landroid/bluetooth/BluetoothGattCharacteristic;[BI)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [readDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#readDescriptor(android.bluetooth.BluetoothGattDescriptor)) - pub fn readDescriptor<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattDescriptor>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "readDescriptor", .descriptor == "(Landroid/bluetooth/BluetoothGattDescriptor;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "readDescriptor\0", "(Landroid/bluetooth/BluetoothGattDescriptor;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [readDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#readDescriptor(android.bluetooth.BluetoothGattDescriptor)) + pub fn readDescriptor<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "readDescriptor", .descriptor == "(Landroid/bluetooth/BluetoothGattDescriptor;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "readDescriptor\0", + "(Landroid/bluetooth/BluetoothGattDescriptor;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [writeDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#writeDescriptor(android.bluetooth.BluetoothGattDescriptor)) - #[deprecated] pub fn writeDescriptor_BluetoothGattDescriptor<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattDescriptor>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "writeDescriptor", .descriptor == "(Landroid/bluetooth/BluetoothGattDescriptor;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "writeDescriptor\0", "(Landroid/bluetooth/BluetoothGattDescriptor;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [writeDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#writeDescriptor(android.bluetooth.BluetoothGattDescriptor)) + #[deprecated] + pub fn writeDescriptor_BluetoothGattDescriptor<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "writeDescriptor", .descriptor == "(Landroid/bluetooth/BluetoothGattDescriptor;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "writeDescriptor\0", + "(Landroid/bluetooth/BluetoothGattDescriptor;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [writeDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#writeDescriptor(android.bluetooth.BluetoothGattDescriptor,%20byte%5B%5D)) - pub fn writeDescriptor_BluetoothGattDescriptor_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattDescriptor>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "writeDescriptor", .descriptor == "(Landroid/bluetooth/BluetoothGattDescriptor;[B)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "writeDescriptor\0", "(Landroid/bluetooth/BluetoothGattDescriptor;[B)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [writeDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#writeDescriptor(android.bluetooth.BluetoothGattDescriptor,%20byte%5B%5D)) + pub fn writeDescriptor_BluetoothGattDescriptor_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "writeDescriptor", .descriptor == "(Landroid/bluetooth/BluetoothGattDescriptor;[B)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "writeDescriptor\0", + "(Landroid/bluetooth/BluetoothGattDescriptor;[B)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [beginReliableWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#beginReliableWrite()) - pub fn beginReliableWrite<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "beginReliableWrite", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "beginReliableWrite\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [beginReliableWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#beginReliableWrite()) + pub fn beginReliableWrite<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "beginReliableWrite", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "beginReliableWrite\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [executeReliableWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#executeReliableWrite()) - pub fn executeReliableWrite<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "executeReliableWrite", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "executeReliableWrite\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [executeReliableWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#executeReliableWrite()) + pub fn executeReliableWrite<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "executeReliableWrite", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "executeReliableWrite\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [abortReliableWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#abortReliableWrite()) - pub fn abortReliableWrite<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "abortReliableWrite", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "abortReliableWrite\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [abortReliableWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#abortReliableWrite()) + pub fn abortReliableWrite<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "abortReliableWrite", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "abortReliableWrite\0", + "()V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [abortReliableWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#abortReliableWrite(android.bluetooth.BluetoothDevice)) - #[deprecated] pub fn abortReliableWrite_BluetoothDevice<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "abortReliableWrite", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "abortReliableWrite\0", "(Landroid/bluetooth/BluetoothDevice;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [abortReliableWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#abortReliableWrite(android.bluetooth.BluetoothDevice)) + #[deprecated] + pub fn abortReliableWrite_BluetoothDevice<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "abortReliableWrite", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "abortReliableWrite\0", + "(Landroid/bluetooth/BluetoothDevice;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCharacteristicNotification](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic,%20boolean)) - pub fn setCharacteristicNotification<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>, arg1: bool) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "setCharacteristicNotification", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "setCharacteristicNotification\0", "(Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCharacteristicNotification](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic,%20boolean)) + pub fn setCharacteristicNotification<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: bool, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "setCharacteristicNotification", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "setCharacteristicNotification\0", + "(Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [readRemoteRssi](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#readRemoteRssi()) - pub fn readRemoteRssi<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "readRemoteRssi", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "readRemoteRssi\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [readRemoteRssi](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#readRemoteRssi()) + pub fn readRemoteRssi<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "readRemoteRssi", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "readRemoteRssi\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [requestMtu](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#requestMtu(int)) - pub fn requestMtu<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "requestMtu", .descriptor == "(I)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "requestMtu\0", "(I)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [requestMtu](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#requestMtu(int)) + pub fn requestMtu<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "requestMtu", .descriptor == "(I)Z" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "requestMtu\0", "(I)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [requestConnectionPriority](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#requestConnectionPriority(int)) - pub fn requestConnectionPriority<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "requestConnectionPriority", .descriptor == "(I)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "requestConnectionPriority\0", "(I)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [requestConnectionPriority](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#requestConnectionPriority(int)) + pub fn requestConnectionPriority<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "requestConnectionPriority", .descriptor == "(I)Z" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "requestConnectionPriority\0", + "(I)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getConnectionState(android.bluetooth.BluetoothDevice)) - #[deprecated] pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getConnectionState(android.bluetooth.BluetoothDevice)) + #[deprecated] + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getConnectedDevices()) - #[deprecated] pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getConnectedDevices()) + #[deprecated] + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getDevicesMatchingConnectionStates(int%5B%5D)) - #[deprecated] pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGatt\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#getDevicesMatchingConnectionStates(int%5B%5D)) + #[deprecated] + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGatt", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGatt\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [CONNECTION_PRIORITY_BALANCED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#CONNECTION_PRIORITY_BALANCED) - pub const CONNECTION_PRIORITY_BALANCED : i32 = 0; + /// public static final [CONNECTION_PRIORITY_BALANCED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#CONNECTION_PRIORITY_BALANCED) + pub const CONNECTION_PRIORITY_BALANCED: i32 = 0; - /// public static final [CONNECTION_PRIORITY_HIGH](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#CONNECTION_PRIORITY_HIGH) - pub const CONNECTION_PRIORITY_HIGH : i32 = 1; + /// public static final [CONNECTION_PRIORITY_HIGH](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#CONNECTION_PRIORITY_HIGH) + pub const CONNECTION_PRIORITY_HIGH: i32 = 1; - /// public static final [CONNECTION_PRIORITY_LOW_POWER](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#CONNECTION_PRIORITY_LOW_POWER) - pub const CONNECTION_PRIORITY_LOW_POWER : i32 = 2; + /// public static final [CONNECTION_PRIORITY_LOW_POWER](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#CONNECTION_PRIORITY_LOW_POWER) + pub const CONNECTION_PRIORITY_LOW_POWER: i32 = 2; - /// public static final [GATT_CONNECTION_CONGESTED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_CONNECTION_CONGESTED) - pub const GATT_CONNECTION_CONGESTED : i32 = 143; + /// public static final [GATT_CONNECTION_CONGESTED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_CONNECTION_CONGESTED) + pub const GATT_CONNECTION_CONGESTED: i32 = 143; - /// public static final [GATT_FAILURE](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_FAILURE) - pub const GATT_FAILURE : i32 = 257; + /// public static final [GATT_FAILURE](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_FAILURE) + pub const GATT_FAILURE: i32 = 257; - /// public static final [GATT_INSUFFICIENT_AUTHENTICATION](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INSUFFICIENT_AUTHENTICATION) - pub const GATT_INSUFFICIENT_AUTHENTICATION : i32 = 5; + /// public static final [GATT_INSUFFICIENT_AUTHENTICATION](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INSUFFICIENT_AUTHENTICATION) + pub const GATT_INSUFFICIENT_AUTHENTICATION: i32 = 5; - /// public static final [GATT_INSUFFICIENT_AUTHORIZATION](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INSUFFICIENT_AUTHORIZATION) - pub const GATT_INSUFFICIENT_AUTHORIZATION : i32 = 8; + /// public static final [GATT_INSUFFICIENT_AUTHORIZATION](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INSUFFICIENT_AUTHORIZATION) + pub const GATT_INSUFFICIENT_AUTHORIZATION: i32 = 8; - /// public static final [GATT_INSUFFICIENT_ENCRYPTION](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INSUFFICIENT_ENCRYPTION) - pub const GATT_INSUFFICIENT_ENCRYPTION : i32 = 15; + /// public static final [GATT_INSUFFICIENT_ENCRYPTION](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INSUFFICIENT_ENCRYPTION) + pub const GATT_INSUFFICIENT_ENCRYPTION: i32 = 15; - /// public static final [GATT_INVALID_ATTRIBUTE_LENGTH](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INVALID_ATTRIBUTE_LENGTH) - pub const GATT_INVALID_ATTRIBUTE_LENGTH : i32 = 13; + /// public static final [GATT_INVALID_ATTRIBUTE_LENGTH](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INVALID_ATTRIBUTE_LENGTH) + pub const GATT_INVALID_ATTRIBUTE_LENGTH: i32 = 13; - /// public static final [GATT_INVALID_OFFSET](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INVALID_OFFSET) - pub const GATT_INVALID_OFFSET : i32 = 7; + /// public static final [GATT_INVALID_OFFSET](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_INVALID_OFFSET) + pub const GATT_INVALID_OFFSET: i32 = 7; - /// public static final [GATT_READ_NOT_PERMITTED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_READ_NOT_PERMITTED) - pub const GATT_READ_NOT_PERMITTED : i32 = 2; + /// public static final [GATT_READ_NOT_PERMITTED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_READ_NOT_PERMITTED) + pub const GATT_READ_NOT_PERMITTED: i32 = 2; - /// public static final [GATT_REQUEST_NOT_SUPPORTED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_REQUEST_NOT_SUPPORTED) - pub const GATT_REQUEST_NOT_SUPPORTED : i32 = 6; + /// public static final [GATT_REQUEST_NOT_SUPPORTED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_REQUEST_NOT_SUPPORTED) + pub const GATT_REQUEST_NOT_SUPPORTED: i32 = 6; - /// public static final [GATT_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_SUCCESS) - pub const GATT_SUCCESS : i32 = 0; + /// public static final [GATT_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_SUCCESS) + pub const GATT_SUCCESS: i32 = 0; - /// public static final [GATT_WRITE_NOT_PERMITTED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_WRITE_NOT_PERMITTED) - pub const GATT_WRITE_NOT_PERMITTED : i32 = 3; - } + /// public static final [GATT_WRITE_NOT_PERMITTED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_WRITE_NOT_PERMITTED) + pub const GATT_WRITE_NOT_PERMITTED: i32 = 3; } - ::java_spaghetti::class! { - /// public class [BluetoothGattCallback](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html) - public class BluetoothGattCallback ("android/bluetooth/BluetoothGattCallback\0") extends super::super::java::lang::Object { + /// pub class [BluetoothGattCallback](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html) + #[repr(transparent)] + pub struct BluetoothGattCallback(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothGattCallback {} - /// [BluetoothGattCallback](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#BluetoothGattCallback()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothGattCallback { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothGattCallback\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattCallback {} + impl ::std::ops::Deref for BluetoothGattCallback { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothGattCallback { + /// [BluetoothGattCallback](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#BluetoothGattCallback()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [onPhyUpdate](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onPhyUpdate(android.bluetooth.BluetoothGatt,%20int,%20int,%20int)) - pub fn onPhyUpdate<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: i32, arg2: i32, arg3: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onPhyUpdate", .descriptor == "(Landroid/bluetooth/BluetoothGatt;III)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onPhyUpdate\0", "(Landroid/bluetooth/BluetoothGatt;III)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onPhyUpdate](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onPhyUpdate(android.bluetooth.BluetoothGatt,%20int,%20int,%20int)) + pub fn onPhyUpdate<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + arg3: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onPhyUpdate", .descriptor == "(Landroid/bluetooth/BluetoothGatt;III)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onPhyUpdate\0", + "(Landroid/bluetooth/BluetoothGatt;III)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onPhyRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onPhyRead(android.bluetooth.BluetoothGatt,%20int,%20int,%20int)) - pub fn onPhyRead<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: i32, arg2: i32, arg3: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onPhyRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;III)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onPhyRead\0", "(Landroid/bluetooth/BluetoothGatt;III)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onPhyRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onPhyRead(android.bluetooth.BluetoothGatt,%20int,%20int,%20int)) + pub fn onPhyRead<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + arg3: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onPhyRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;III)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onPhyRead\0", + "(Landroid/bluetooth/BluetoothGatt;III)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onConnectionStateChange](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onConnectionStateChange(android.bluetooth.BluetoothGatt,%20int,%20int)) - pub fn onConnectionStateChange<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: i32, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onConnectionStateChange", .descriptor == "(Landroid/bluetooth/BluetoothGatt;II)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onConnectionStateChange\0", "(Landroid/bluetooth/BluetoothGatt;II)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onConnectionStateChange](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onConnectionStateChange(android.bluetooth.BluetoothGatt,%20int,%20int)) + pub fn onConnectionStateChange<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onConnectionStateChange", .descriptor == "(Landroid/bluetooth/BluetoothGatt;II)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onConnectionStateChange\0", + "(Landroid/bluetooth/BluetoothGatt;II)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onServicesDiscovered](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onServicesDiscovered(android.bluetooth.BluetoothGatt,%20int)) - pub fn onServicesDiscovered<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onServicesDiscovered", .descriptor == "(Landroid/bluetooth/BluetoothGatt;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onServicesDiscovered\0", "(Landroid/bluetooth/BluetoothGatt;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onServicesDiscovered](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onServicesDiscovered(android.bluetooth.BluetoothGatt,%20int)) + pub fn onServicesDiscovered<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onServicesDiscovered", .descriptor == "(Landroid/bluetooth/BluetoothGatt;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onServicesDiscovered\0", + "(Landroid/bluetooth/BluetoothGatt;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onCharacteristicRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicRead(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic,%20int)) - #[deprecated] pub fn onCharacteristicRead_BluetoothGatt_BluetoothGattCharacteristic_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onCharacteristicRead\0", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onCharacteristicRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicRead(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic,%20int)) + #[deprecated] + pub fn onCharacteristicRead_BluetoothGatt_BluetoothGattCharacteristic_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onCharacteristicRead\0", + "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onCharacteristicRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicRead(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic,%20byte%5B%5D,%20int)) - pub fn onCharacteristicRead_BluetoothGatt_BluetoothGattCharacteristic_byte_array_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg3: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[BI)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onCharacteristicRead\0", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[BI)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onCharacteristicRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicRead(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic,%20byte%5B%5D,%20int)) + pub fn onCharacteristicRead_BluetoothGatt_BluetoothGattCharacteristic_byte_array_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg3: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[BI)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onCharacteristicRead\0", + "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[BI)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onCharacteristicWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicWrite(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic,%20int)) - pub fn onCharacteristicWrite<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicWrite", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onCharacteristicWrite\0", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onCharacteristicWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicWrite(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic,%20int)) + pub fn onCharacteristicWrite<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicWrite", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onCharacteristicWrite\0", + "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onCharacteristicChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic)) - #[deprecated] pub fn onCharacteristicChanged_BluetoothGatt_BluetoothGattCharacteristic<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicChanged", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onCharacteristicChanged\0", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onCharacteristicChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic)) + #[deprecated] + pub fn onCharacteristicChanged_BluetoothGatt_BluetoothGattCharacteristic<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicChanged", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onCharacteristicChanged\0", + "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onCharacteristicChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic,%20byte%5B%5D)) - pub fn onCharacteristicChanged_BluetoothGatt_BluetoothGattCharacteristic_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicChanged", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onCharacteristicChanged\0", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[B)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onCharacteristicChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic,%20byte%5B%5D)) + pub fn onCharacteristicChanged_BluetoothGatt_BluetoothGattCharacteristic_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onCharacteristicChanged", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[B)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue(), arg2.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onCharacteristicChanged\0", + "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[B)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onDescriptorRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onDescriptorRead(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattDescriptor,%20int)) - #[deprecated] pub fn onDescriptorRead_BluetoothGatt_BluetoothGattDescriptor_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattDescriptor>>, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onDescriptorRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onDescriptorRead\0", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onDescriptorRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onDescriptorRead(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattDescriptor,%20int)) + #[deprecated] + pub fn onDescriptorRead_BluetoothGatt_BluetoothGattDescriptor_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onDescriptorRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onDescriptorRead\0", + "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onDescriptorRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onDescriptorRead(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattDescriptor,%20int,%20byte%5B%5D)) - pub fn onDescriptorRead_BluetoothGatt_BluetoothGattDescriptor_int_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattDescriptor>>, arg2: i32, arg3: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onDescriptorRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I[B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onDescriptorRead\0", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I[B)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onDescriptorRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onDescriptorRead(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattDescriptor,%20int,%20byte%5B%5D)) + pub fn onDescriptorRead_BluetoothGatt_BluetoothGattDescriptor_int_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: i32, + arg3: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onDescriptorRead", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I[B)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + arg3.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onDescriptorRead\0", + "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I[B)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onDescriptorWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onDescriptorWrite(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattDescriptor,%20int)) - pub fn onDescriptorWrite<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattDescriptor>>, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onDescriptorWrite", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onDescriptorWrite\0", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onDescriptorWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onDescriptorWrite(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattDescriptor,%20int)) + pub fn onDescriptorWrite<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onDescriptorWrite", .descriptor == "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onDescriptorWrite\0", + "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattDescriptor;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onReliableWriteCompleted](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onReliableWriteCompleted(android.bluetooth.BluetoothGatt,%20int)) - pub fn onReliableWriteCompleted<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onReliableWriteCompleted", .descriptor == "(Landroid/bluetooth/BluetoothGatt;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onReliableWriteCompleted\0", "(Landroid/bluetooth/BluetoothGatt;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onReliableWriteCompleted](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onReliableWriteCompleted(android.bluetooth.BluetoothGatt,%20int)) + pub fn onReliableWriteCompleted<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onReliableWriteCompleted", .descriptor == "(Landroid/bluetooth/BluetoothGatt;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onReliableWriteCompleted\0", + "(Landroid/bluetooth/BluetoothGatt;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onReadRemoteRssi](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onReadRemoteRssi(android.bluetooth.BluetoothGatt,%20int,%20int)) - pub fn onReadRemoteRssi<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: i32, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onReadRemoteRssi", .descriptor == "(Landroid/bluetooth/BluetoothGatt;II)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onReadRemoteRssi\0", "(Landroid/bluetooth/BluetoothGatt;II)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onReadRemoteRssi](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onReadRemoteRssi(android.bluetooth.BluetoothGatt,%20int,%20int)) + pub fn onReadRemoteRssi<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onReadRemoteRssi", .descriptor == "(Landroid/bluetooth/BluetoothGatt;II)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onReadRemoteRssi\0", + "(Landroid/bluetooth/BluetoothGatt;II)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onMtuChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onMtuChanged(android.bluetooth.BluetoothGatt,%20int,%20int)) - pub fn onMtuChanged<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>, arg1: i32, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onMtuChanged", .descriptor == "(Landroid/bluetooth/BluetoothGatt;II)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onMtuChanged\0", "(Landroid/bluetooth/BluetoothGatt;II)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onMtuChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onMtuChanged(android.bluetooth.BluetoothGatt,%20int,%20int)) + pub fn onMtuChanged<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onMtuChanged", .descriptor == "(Landroid/bluetooth/BluetoothGatt;II)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onMtuChanged\0", + "(Landroid/bluetooth/BluetoothGatt;II)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onServiceChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onServiceChanged(android.bluetooth.BluetoothGatt)) - pub fn onServiceChanged<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGatt>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onServiceChanged", .descriptor == "(Landroid/bluetooth/BluetoothGatt;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCallback\0", "onServiceChanged\0", "(Landroid/bluetooth/BluetoothGatt;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onServiceChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback.html#onServiceChanged(android.bluetooth.BluetoothGatt)) + pub fn onServiceChanged<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCallback", java.flags == PUBLIC, .name == "onServiceChanged", .descriptor == "(Landroid/bluetooth/BluetoothGatt;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCallback\0", + "onServiceChanged\0", + "(Landroid/bluetooth/BluetoothGatt;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public class [BluetoothGattCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html) - public class BluetoothGattCharacteristic ("android/bluetooth/BluetoothGattCharacteristic\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub class [BluetoothGattCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html) + #[repr(transparent)] + pub struct BluetoothGattCharacteristic(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothGattCharacteristic {} - /// [BluetoothGattCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#BluetoothGattCharacteristic(java.util.UUID,%20int,%20int)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>, arg1: i32, arg2: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/util/UUID;II)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "\0", "(Ljava/util/UUID;II)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothGattCharacteristic { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothGattCharacteristic\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattCharacteristic {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattCharacteristic {} + impl ::std::ops::Deref for BluetoothGattCharacteristic { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothGattCharacteristic { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothGattCharacteristic { + /// [BluetoothGattCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#BluetoothGattCharacteristic(java.util.UUID,%20int,%20int)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/util/UUID;II)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "\0", + "(Ljava/util/UUID;II)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [addDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#addDescriptor(android.bluetooth.BluetoothGattDescriptor)) - pub fn addDescriptor<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattDescriptor>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "addDescriptor", .descriptor == "(Landroid/bluetooth/BluetoothGattDescriptor;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "addDescriptor\0", "(Landroid/bluetooth/BluetoothGattDescriptor;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#addDescriptor(android.bluetooth.BluetoothGattDescriptor)) + pub fn addDescriptor<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "addDescriptor", .descriptor == "(Landroid/bluetooth/BluetoothGattDescriptor;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "addDescriptor\0", + "(Landroid/bluetooth/BluetoothGattDescriptor;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getService](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getService()) - pub fn getService<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattService>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getService", .descriptor == "()Landroid/bluetooth/BluetoothGattService;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getService\0", "()Landroid/bluetooth/BluetoothGattService;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getService](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getService()) + pub fn getService<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattService>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getService", .descriptor == "()Landroid/bluetooth/BluetoothGattService;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getService\0", + "()Landroid/bluetooth/BluetoothGattService;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getUuid](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getUuid()) - pub fn getUuid<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::UUID>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getUuid", .descriptor == "()Ljava/util/UUID;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getUuid\0", "()Ljava/util/UUID;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getUuid](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getUuid()) + pub fn getUuid<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::UUID>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getUuid", .descriptor == "()Ljava/util/UUID;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getUuid\0", + "()Ljava/util/UUID;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getInstanceId](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getInstanceId()) - pub fn getInstanceId<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getInstanceId", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getInstanceId\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getInstanceId](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getInstanceId()) + pub fn getInstanceId<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getInstanceId", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getInstanceId\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getProperties](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getProperties()) - pub fn getProperties<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getProperties", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getProperties\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getProperties](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getProperties()) + pub fn getProperties<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getProperties", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getProperties\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getPermissions](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getPermissions()) - pub fn getPermissions<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getPermissions", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getPermissions\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getPermissions](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getPermissions()) + pub fn getPermissions<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getPermissions", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getPermissions\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getWriteType](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getWriteType()) - pub fn getWriteType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getWriteType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getWriteType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getWriteType](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getWriteType()) + pub fn getWriteType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getWriteType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getWriteType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setWriteType](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setWriteType(int)) - pub fn setWriteType<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setWriteType", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "setWriteType\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setWriteType](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setWriteType(int)) + pub fn setWriteType<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setWriteType", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "setWriteType\0", + "(I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDescriptors](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getDescriptors()) - pub fn getDescriptors<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getDescriptors", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getDescriptors\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDescriptors](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getDescriptors()) + pub fn getDescriptors<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getDescriptors", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getDescriptors\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getDescriptor(java.util.UUID)) - pub fn getDescriptor<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattDescriptor>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getDescriptor", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattDescriptor;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getDescriptor\0", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattDescriptor;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getDescriptor(java.util.UUID)) + pub fn getDescriptor<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattDescriptor>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getDescriptor", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattDescriptor;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getDescriptor\0", + "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattDescriptor;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getValue()) - #[deprecated] pub fn getValue<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getValue", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getValue\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getValue()) + #[deprecated] + pub fn getValue<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getValue", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getValue\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getStringValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getStringValue(int)) - #[deprecated] pub fn getStringValue<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getStringValue", .descriptor == "(I)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "getStringValue\0", "(I)Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getStringValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#getStringValue(int)) + #[deprecated] + pub fn getStringValue<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "getStringValue", .descriptor == "(I)Ljava/lang/String;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "getStringValue\0", + "(I)Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setValue(byte%5B%5D)) - #[deprecated] pub fn setValue_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setValue", .descriptor == "([B)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "setValue\0", "([B)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setValue(byte%5B%5D)) + #[deprecated] + pub fn setValue_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setValue", .descriptor == "([B)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "setValue\0", + "([B)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setValue(int,%20int,%20int)) - #[deprecated] pub fn setValue_int_int_int<'env>(&'env self, arg0: i32, arg1: i32, arg2: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setValue", .descriptor == "(III)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "setValue\0", "(III)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setValue(int,%20int,%20int)) + #[deprecated] + pub fn setValue_int_int_int<'env>( + &'env self, + arg0: i32, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setValue", .descriptor == "(III)Z" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "setValue\0", + "(III)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setValue(int,%20int,%20int,%20int)) - #[deprecated] pub fn setValue_int_int_int_int<'env>(&'env self, arg0: i32, arg1: i32, arg2: i32, arg3: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setValue", .descriptor == "(IIII)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "setValue\0", "(IIII)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setValue(int,%20int,%20int,%20int)) + #[deprecated] + pub fn setValue_int_int_int_int<'env>( + &'env self, + arg0: i32, + arg1: i32, + arg2: i32, + arg3: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setValue", .descriptor == "(IIII)Z" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "setValue\0", + "(IIII)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setValue(java.lang.String)) - #[deprecated] pub fn setValue_String<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setValue", .descriptor == "(Ljava/lang/String;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattCharacteristic\0", "setValue\0", "(Ljava/lang/String;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#setValue(java.lang.String)) + #[deprecated] + pub fn setValue_String<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattCharacteristic", java.flags == PUBLIC, .name == "setValue", .descriptor == "(Ljava/lang/String;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattCharacteristic\0", + "setValue\0", + "(Ljava/lang/String;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [FORMAT_FLOAT](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_FLOAT) - pub const FORMAT_FLOAT : i32 = 52; + /// public static final [FORMAT_FLOAT](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_FLOAT) + pub const FORMAT_FLOAT: i32 = 52; - /// public static final [FORMAT_SFLOAT](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_SFLOAT) - pub const FORMAT_SFLOAT : i32 = 50; + /// public static final [FORMAT_SFLOAT](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_SFLOAT) + pub const FORMAT_SFLOAT: i32 = 50; - /// public static final [FORMAT_SINT16](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_SINT16) - pub const FORMAT_SINT16 : i32 = 34; + /// public static final [FORMAT_SINT16](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_SINT16) + pub const FORMAT_SINT16: i32 = 34; - /// public static final [FORMAT_SINT32](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_SINT32) - pub const FORMAT_SINT32 : i32 = 36; + /// public static final [FORMAT_SINT32](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_SINT32) + pub const FORMAT_SINT32: i32 = 36; - /// public static final [FORMAT_SINT8](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_SINT8) - pub const FORMAT_SINT8 : i32 = 33; + /// public static final [FORMAT_SINT8](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_SINT8) + pub const FORMAT_SINT8: i32 = 33; - /// public static final [FORMAT_UINT16](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_UINT16) - pub const FORMAT_UINT16 : i32 = 18; + /// public static final [FORMAT_UINT16](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_UINT16) + pub const FORMAT_UINT16: i32 = 18; - /// public static final [FORMAT_UINT32](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_UINT32) - pub const FORMAT_UINT32 : i32 = 20; + /// public static final [FORMAT_UINT32](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_UINT32) + pub const FORMAT_UINT32: i32 = 20; - /// public static final [FORMAT_UINT8](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_UINT8) - pub const FORMAT_UINT8 : i32 = 17; + /// public static final [FORMAT_UINT8](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#FORMAT_UINT8) + pub const FORMAT_UINT8: i32 = 17; - /// public static final [PERMISSION_READ](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_READ) - pub const PERMISSION_READ : i32 = 1; + /// public static final [PERMISSION_READ](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_READ) + pub const PERMISSION_READ: i32 = 1; - /// public static final [PERMISSION_READ_ENCRYPTED](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_READ_ENCRYPTED) - pub const PERMISSION_READ_ENCRYPTED : i32 = 2; + /// public static final [PERMISSION_READ_ENCRYPTED](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_READ_ENCRYPTED) + pub const PERMISSION_READ_ENCRYPTED: i32 = 2; - /// public static final [PERMISSION_READ_ENCRYPTED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_READ_ENCRYPTED_MITM) - pub const PERMISSION_READ_ENCRYPTED_MITM : i32 = 4; + /// public static final [PERMISSION_READ_ENCRYPTED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_READ_ENCRYPTED_MITM) + pub const PERMISSION_READ_ENCRYPTED_MITM: i32 = 4; - /// public static final [PERMISSION_WRITE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE) - pub const PERMISSION_WRITE : i32 = 16; + /// public static final [PERMISSION_WRITE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE) + pub const PERMISSION_WRITE: i32 = 16; - /// public static final [PERMISSION_WRITE_ENCRYPTED](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE_ENCRYPTED) - pub const PERMISSION_WRITE_ENCRYPTED : i32 = 32; + /// public static final [PERMISSION_WRITE_ENCRYPTED](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE_ENCRYPTED) + pub const PERMISSION_WRITE_ENCRYPTED: i32 = 32; - /// public static final [PERMISSION_WRITE_ENCRYPTED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE_ENCRYPTED_MITM) - pub const PERMISSION_WRITE_ENCRYPTED_MITM : i32 = 64; + /// public static final [PERMISSION_WRITE_ENCRYPTED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE_ENCRYPTED_MITM) + pub const PERMISSION_WRITE_ENCRYPTED_MITM: i32 = 64; - /// public static final [PERMISSION_WRITE_SIGNED](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE_SIGNED) - pub const PERMISSION_WRITE_SIGNED : i32 = 128; + /// public static final [PERMISSION_WRITE_SIGNED](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE_SIGNED) + pub const PERMISSION_WRITE_SIGNED: i32 = 128; - /// public static final [PERMISSION_WRITE_SIGNED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE_SIGNED_MITM) - pub const PERMISSION_WRITE_SIGNED_MITM : i32 = 256; + /// public static final [PERMISSION_WRITE_SIGNED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PERMISSION_WRITE_SIGNED_MITM) + pub const PERMISSION_WRITE_SIGNED_MITM: i32 = 256; - /// public static final [PROPERTY_BROADCAST](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_BROADCAST) - pub const PROPERTY_BROADCAST : i32 = 1; + /// public static final [PROPERTY_BROADCAST](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_BROADCAST) + pub const PROPERTY_BROADCAST: i32 = 1; - /// public static final [PROPERTY_EXTENDED_PROPS](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_EXTENDED_PROPS) - pub const PROPERTY_EXTENDED_PROPS : i32 = 128; + /// public static final [PROPERTY_EXTENDED_PROPS](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_EXTENDED_PROPS) + pub const PROPERTY_EXTENDED_PROPS: i32 = 128; - /// public static final [PROPERTY_INDICATE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_INDICATE) - pub const PROPERTY_INDICATE : i32 = 32; + /// public static final [PROPERTY_INDICATE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_INDICATE) + pub const PROPERTY_INDICATE: i32 = 32; - /// public static final [PROPERTY_NOTIFY](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_NOTIFY) - pub const PROPERTY_NOTIFY : i32 = 16; + /// public static final [PROPERTY_NOTIFY](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_NOTIFY) + pub const PROPERTY_NOTIFY: i32 = 16; - /// public static final [PROPERTY_READ](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_READ) - pub const PROPERTY_READ : i32 = 2; + /// public static final [PROPERTY_READ](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_READ) + pub const PROPERTY_READ: i32 = 2; - /// public static final [PROPERTY_SIGNED_WRITE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_SIGNED_WRITE) - pub const PROPERTY_SIGNED_WRITE : i32 = 64; + /// public static final [PROPERTY_SIGNED_WRITE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_SIGNED_WRITE) + pub const PROPERTY_SIGNED_WRITE: i32 = 64; - /// public static final [PROPERTY_WRITE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_WRITE) - pub const PROPERTY_WRITE : i32 = 8; + /// public static final [PROPERTY_WRITE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_WRITE) + pub const PROPERTY_WRITE: i32 = 8; - /// public static final [PROPERTY_WRITE_NO_RESPONSE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_WRITE_NO_RESPONSE) - pub const PROPERTY_WRITE_NO_RESPONSE : i32 = 4; + /// public static final [PROPERTY_WRITE_NO_RESPONSE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#PROPERTY_WRITE_NO_RESPONSE) + pub const PROPERTY_WRITE_NO_RESPONSE: i32 = 4; - /// public static final [WRITE_TYPE_DEFAULT](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#WRITE_TYPE_DEFAULT) - pub const WRITE_TYPE_DEFAULT : i32 = 2; + /// public static final [WRITE_TYPE_DEFAULT](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#WRITE_TYPE_DEFAULT) + pub const WRITE_TYPE_DEFAULT: i32 = 2; - /// public static final [WRITE_TYPE_NO_RESPONSE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#WRITE_TYPE_NO_RESPONSE) - pub const WRITE_TYPE_NO_RESPONSE : i32 = 1; + /// public static final [WRITE_TYPE_NO_RESPONSE](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#WRITE_TYPE_NO_RESPONSE) + pub const WRITE_TYPE_NO_RESPONSE: i32 = 1; - /// public static final [WRITE_TYPE_SIGNED](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#WRITE_TYPE_SIGNED) - pub const WRITE_TYPE_SIGNED : i32 = 4; - } + /// public static final [WRITE_TYPE_SIGNED](https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic.html#WRITE_TYPE_SIGNED) + pub const WRITE_TYPE_SIGNED: i32 = 4; } - ::java_spaghetti::class! { - /// public class [BluetoothGattDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html) - public class BluetoothGattDescriptor ("android/bluetooth/BluetoothGattDescriptor\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub class [BluetoothGattDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html) + #[repr(transparent)] + pub struct BluetoothGattDescriptor(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothGattDescriptor {} - /// [BluetoothGattDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#BluetoothGattDescriptor(java.util.UUID,%20int)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>, arg1: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/util/UUID;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattDescriptor\0", "\0", "(Ljava/util/UUID;I)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothGattDescriptor { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothGattDescriptor\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattDescriptor {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattDescriptor {} + impl ::std::ops::Deref for BluetoothGattDescriptor { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothGattDescriptor { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothGattDescriptor { + /// [BluetoothGattDescriptor](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#BluetoothGattDescriptor(java.util.UUID,%20int)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/util/UUID;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattDescriptor\0", + "\0", + "(Ljava/util/UUID;I)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattDescriptor\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattDescriptor\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#getCharacteristic()) - pub fn getCharacteristic<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattCharacteristic>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "getCharacteristic", .descriptor == "()Landroid/bluetooth/BluetoothGattCharacteristic;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattDescriptor\0", "getCharacteristic\0", "()Landroid/bluetooth/BluetoothGattCharacteristic;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#getCharacteristic()) + pub fn getCharacteristic<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattCharacteristic>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "getCharacteristic", .descriptor == "()Landroid/bluetooth/BluetoothGattCharacteristic;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattDescriptor\0", + "getCharacteristic\0", + "()Landroid/bluetooth/BluetoothGattCharacteristic;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getUuid](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#getUuid()) - pub fn getUuid<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::UUID>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "getUuid", .descriptor == "()Ljava/util/UUID;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattDescriptor\0", "getUuid\0", "()Ljava/util/UUID;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getUuid](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#getUuid()) + pub fn getUuid<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::UUID>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "getUuid", .descriptor == "()Ljava/util/UUID;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattDescriptor\0", + "getUuid\0", + "()Ljava/util/UUID;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getPermissions](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#getPermissions()) - pub fn getPermissions<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "getPermissions", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattDescriptor\0", "getPermissions\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getPermissions](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#getPermissions()) + pub fn getPermissions<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "getPermissions", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattDescriptor\0", + "getPermissions\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#getValue()) - #[deprecated] pub fn getValue<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "getValue", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattDescriptor\0", "getValue\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#getValue()) + #[deprecated] + pub fn getValue<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "getValue", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattDescriptor\0", + "getValue\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#setValue(byte%5B%5D)) - #[deprecated] pub fn setValue<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "setValue", .descriptor == "([B)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattDescriptor\0", "setValue\0", "([B)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setValue](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#setValue(byte%5B%5D)) + #[deprecated] + pub fn setValue<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattDescriptor", java.flags == PUBLIC, .name == "setValue", .descriptor == "([B)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattDescriptor\0", + "setValue\0", + "([B)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// **get** public static final [DISABLE_NOTIFICATION_VALUE](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#DISABLE_NOTIFICATION_VALUE) - pub fn DISABLE_NOTIFICATION_VALUE<'env>(env: ::java_spaghetti::Env<'env>) -> ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>> { - unsafe { - let (__jni_class, __jni_field) = env.require_class_static_field("android/bluetooth/BluetoothGattDescriptor\0", "DISABLE_NOTIFICATION_VALUE\0", "[B\0"); - env.get_static_object_field(__jni_class, __jni_field) - } + /// **get** public static final [DISABLE_NOTIFICATION_VALUE](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#DISABLE_NOTIFICATION_VALUE) + pub fn DISABLE_NOTIFICATION_VALUE<'env>( + env: ::java_spaghetti::Env<'env>, + ) -> ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>> { + unsafe { + let (__jni_class, __jni_field) = env.require_class_static_field( + "android/bluetooth/BluetoothGattDescriptor\0", + "DISABLE_NOTIFICATION_VALUE\0", + "[B\0", + ); + env.get_static_object_field(__jni_class, __jni_field) } + } - /// **get** public static final [ENABLE_INDICATION_VALUE](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#ENABLE_INDICATION_VALUE) - pub fn ENABLE_INDICATION_VALUE<'env>(env: ::java_spaghetti::Env<'env>) -> ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>> { - unsafe { - let (__jni_class, __jni_field) = env.require_class_static_field("android/bluetooth/BluetoothGattDescriptor\0", "ENABLE_INDICATION_VALUE\0", "[B\0"); - env.get_static_object_field(__jni_class, __jni_field) - } + /// **get** public static final [ENABLE_INDICATION_VALUE](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#ENABLE_INDICATION_VALUE) + pub fn ENABLE_INDICATION_VALUE<'env>( + env: ::java_spaghetti::Env<'env>, + ) -> ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>> { + unsafe { + let (__jni_class, __jni_field) = env.require_class_static_field( + "android/bluetooth/BluetoothGattDescriptor\0", + "ENABLE_INDICATION_VALUE\0", + "[B\0", + ); + env.get_static_object_field(__jni_class, __jni_field) } + } - /// **get** public static final [ENABLE_NOTIFICATION_VALUE](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#ENABLE_NOTIFICATION_VALUE) - pub fn ENABLE_NOTIFICATION_VALUE<'env>(env: ::java_spaghetti::Env<'env>) -> ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>> { - unsafe { - let (__jni_class, __jni_field) = env.require_class_static_field("android/bluetooth/BluetoothGattDescriptor\0", "ENABLE_NOTIFICATION_VALUE\0", "[B\0"); - env.get_static_object_field(__jni_class, __jni_field) - } + /// **get** public static final [ENABLE_NOTIFICATION_VALUE](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#ENABLE_NOTIFICATION_VALUE) + pub fn ENABLE_NOTIFICATION_VALUE<'env>( + env: ::java_spaghetti::Env<'env>, + ) -> ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>> { + unsafe { + let (__jni_class, __jni_field) = env.require_class_static_field( + "android/bluetooth/BluetoothGattDescriptor\0", + "ENABLE_NOTIFICATION_VALUE\0", + "[B\0", + ); + env.get_static_object_field(__jni_class, __jni_field) } + } - /// public static final [PERMISSION_READ](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_READ) - pub const PERMISSION_READ : i32 = 1; + /// public static final [PERMISSION_READ](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_READ) + pub const PERMISSION_READ: i32 = 1; - /// public static final [PERMISSION_READ_ENCRYPTED](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_READ_ENCRYPTED) - pub const PERMISSION_READ_ENCRYPTED : i32 = 2; + /// public static final [PERMISSION_READ_ENCRYPTED](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_READ_ENCRYPTED) + pub const PERMISSION_READ_ENCRYPTED: i32 = 2; - /// public static final [PERMISSION_READ_ENCRYPTED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_READ_ENCRYPTED_MITM) - pub const PERMISSION_READ_ENCRYPTED_MITM : i32 = 4; + /// public static final [PERMISSION_READ_ENCRYPTED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_READ_ENCRYPTED_MITM) + pub const PERMISSION_READ_ENCRYPTED_MITM: i32 = 4; - /// public static final [PERMISSION_WRITE](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE) - pub const PERMISSION_WRITE : i32 = 16; + /// public static final [PERMISSION_WRITE](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE) + pub const PERMISSION_WRITE: i32 = 16; - /// public static final [PERMISSION_WRITE_ENCRYPTED](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE_ENCRYPTED) - pub const PERMISSION_WRITE_ENCRYPTED : i32 = 32; + /// public static final [PERMISSION_WRITE_ENCRYPTED](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE_ENCRYPTED) + pub const PERMISSION_WRITE_ENCRYPTED: i32 = 32; - /// public static final [PERMISSION_WRITE_ENCRYPTED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE_ENCRYPTED_MITM) - pub const PERMISSION_WRITE_ENCRYPTED_MITM : i32 = 64; + /// public static final [PERMISSION_WRITE_ENCRYPTED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE_ENCRYPTED_MITM) + pub const PERMISSION_WRITE_ENCRYPTED_MITM: i32 = 64; - /// public static final [PERMISSION_WRITE_SIGNED](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE_SIGNED) - pub const PERMISSION_WRITE_SIGNED : i32 = 128; + /// public static final [PERMISSION_WRITE_SIGNED](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE_SIGNED) + pub const PERMISSION_WRITE_SIGNED: i32 = 128; - /// public static final [PERMISSION_WRITE_SIGNED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE_SIGNED_MITM) - pub const PERMISSION_WRITE_SIGNED_MITM : i32 = 256; - } + /// public static final [PERMISSION_WRITE_SIGNED_MITM](https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor.html#PERMISSION_WRITE_SIGNED_MITM) + pub const PERMISSION_WRITE_SIGNED_MITM: i32 = 256; } - ::java_spaghetti::class! { - /// public final class [BluetoothGattServer](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html) - public final class BluetoothGattServer ("android/bluetooth/BluetoothGattServer\0") extends super::super::java::lang::Object, implements BluetoothProfile { + /// pub final class [BluetoothGattServer](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html) + #[repr(transparent)] + pub struct BluetoothGattServer(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothGattServer {} - /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#close()) - pub fn close<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "close", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "close\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothGattServer { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothGattServer\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattServer {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattServer {} + impl ::std::ops::Deref for BluetoothGattServer { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothGattServer { + fn as_ref(&self) -> &BluetoothProfile { + unsafe { &*(self as *const Self as *const BluetoothProfile) } + } + } + impl BluetoothGattServer { + /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#close()) + pub fn close<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "close", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "close\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [connect](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#connect(android.bluetooth.BluetoothDevice,%20boolean)) - pub fn connect<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: bool) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "connect", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Z)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "connect\0", "(Landroid/bluetooth/BluetoothDevice;Z)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [connect](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#connect(android.bluetooth.BluetoothDevice,%20boolean)) + pub fn connect<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: bool, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "connect", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Z)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "connect\0", + "(Landroid/bluetooth/BluetoothDevice;Z)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [cancelConnection](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#cancelConnection(android.bluetooth.BluetoothDevice)) - pub fn cancelConnection<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "cancelConnection", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "cancelConnection\0", "(Landroid/bluetooth/BluetoothDevice;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [cancelConnection](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#cancelConnection(android.bluetooth.BluetoothDevice)) + pub fn cancelConnection<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "cancelConnection", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "cancelConnection\0", + "(Landroid/bluetooth/BluetoothDevice;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setPreferredPhy](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#setPreferredPhy(android.bluetooth.BluetoothDevice,%20int,%20int,%20int)) - pub fn setPreferredPhy<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: i32, arg3: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "setPreferredPhy", .descriptor == "(Landroid/bluetooth/BluetoothDevice;III)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "setPreferredPhy\0", "(Landroid/bluetooth/BluetoothDevice;III)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setPreferredPhy](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#setPreferredPhy(android.bluetooth.BluetoothDevice,%20int,%20int,%20int)) + pub fn setPreferredPhy<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + arg3: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "setPreferredPhy", .descriptor == "(Landroid/bluetooth/BluetoothDevice;III)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "setPreferredPhy\0", + "(Landroid/bluetooth/BluetoothDevice;III)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [readPhy](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#readPhy(android.bluetooth.BluetoothDevice)) - pub fn readPhy<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "readPhy", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "readPhy\0", "(Landroid/bluetooth/BluetoothDevice;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [readPhy](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#readPhy(android.bluetooth.BluetoothDevice)) + pub fn readPhy<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "readPhy", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "readPhy\0", + "(Landroid/bluetooth/BluetoothDevice;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [sendResponse](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#sendResponse(android.bluetooth.BluetoothDevice,%20int,%20int,%20int,%20byte%5B%5D)) - pub fn sendResponse<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: i32, arg3: i32, arg4: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "sendResponse", .descriptor == "(Landroid/bluetooth/BluetoothDevice;III[B)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "sendResponse\0", "(Landroid/bluetooth/BluetoothDevice;III[B)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [sendResponse](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#sendResponse(android.bluetooth.BluetoothDevice,%20int,%20int,%20int,%20byte%5B%5D)) + pub fn sendResponse<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + arg3: i32, + arg4: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "sendResponse", .descriptor == "(Landroid/bluetooth/BluetoothDevice;III[B)Z" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + arg4.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "sendResponse\0", + "(Landroid/bluetooth/BluetoothDevice;III[B)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [notifyCharacteristicChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#notifyCharacteristicChanged(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothGattCharacteristic,%20boolean)) - #[deprecated] pub fn notifyCharacteristicChanged_BluetoothDevice_BluetoothGattCharacteristic_boolean<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>, arg2: bool) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "notifyCharacteristicChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "notifyCharacteristicChanged\0", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [notifyCharacteristicChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#notifyCharacteristicChanged(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothGattCharacteristic,%20boolean)) + #[deprecated] + pub fn notifyCharacteristicChanged_BluetoothDevice_BluetoothGattCharacteristic_boolean<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: bool, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "notifyCharacteristicChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "notifyCharacteristicChanged\0", + "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [notifyCharacteristicChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#notifyCharacteristicChanged(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothGattCharacteristic,%20boolean,%20byte%5B%5D)) - pub fn notifyCharacteristicChanged_BluetoothDevice_BluetoothGattCharacteristic_boolean_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>, arg2: bool, arg3: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "notifyCharacteristicChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z[B)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "notifyCharacteristicChanged\0", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z[B)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [notifyCharacteristicChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#notifyCharacteristicChanged(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothGattCharacteristic,%20boolean,%20byte%5B%5D)) + pub fn notifyCharacteristicChanged_BluetoothDevice_BluetoothGattCharacteristic_boolean_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: bool, + arg3: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "notifyCharacteristicChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z[B)I" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + arg3.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "notifyCharacteristicChanged\0", + "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothGattCharacteristic;Z[B)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [addService](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#addService(android.bluetooth.BluetoothGattService)) - pub fn addService<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattService>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "addService", .descriptor == "(Landroid/bluetooth/BluetoothGattService;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "addService\0", "(Landroid/bluetooth/BluetoothGattService;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addService](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#addService(android.bluetooth.BluetoothGattService)) + pub fn addService<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "addService", .descriptor == "(Landroid/bluetooth/BluetoothGattService;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "addService\0", + "(Landroid/bluetooth/BluetoothGattService;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [removeService](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#removeService(android.bluetooth.BluetoothGattService)) - pub fn removeService<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattService>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "removeService", .descriptor == "(Landroid/bluetooth/BluetoothGattService;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "removeService\0", "(Landroid/bluetooth/BluetoothGattService;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [removeService](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#removeService(android.bluetooth.BluetoothGattService)) + pub fn removeService<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "removeService", .descriptor == "(Landroid/bluetooth/BluetoothGattService;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "removeService\0", + "(Landroid/bluetooth/BluetoothGattService;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [clearServices](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#clearServices()) - pub fn clearServices<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "clearServices", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "clearServices\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [clearServices](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#clearServices()) + pub fn clearServices<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "clearServices", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "clearServices\0", + "()V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getServices](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getServices()) - pub fn getServices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getServices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "getServices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServices](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getServices()) + pub fn getServices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getServices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "getServices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getService](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getService(java.util.UUID)) - pub fn getService<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattService>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getService", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "getService\0", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getService](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getService(java.util.UUID)) + pub fn getService<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattService>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getService", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "getService\0", + "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getConnectionState(android.bluetooth.BluetoothDevice)) - pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getConnectionState(android.bluetooth.BluetoothDevice)) + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getConnectedDevices()) - pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getConnectedDevices()) + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getDevicesMatchingConnectionStates(int%5B%5D)) - pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServer\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothGattServer.html#getDevicesMatchingConnectionStates(int%5B%5D)) + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattServer", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServer\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - - ::java_spaghetti::class! { - /// public class [BluetoothGattServerCallback](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html) - public class BluetoothGattServerCallback ("android/bluetooth/BluetoothGattServerCallback\0") extends super::super::java::lang::Object { - - /// [BluetoothGattServerCallback](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#BluetoothGattServerCallback()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + + /// pub class [BluetoothGattServerCallback](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html) + #[repr(transparent)] + pub struct BluetoothGattServerCallback(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothGattServerCallback {} + + unsafe impl ::java_spaghetti::JniType for BluetoothGattServerCallback { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothGattServerCallback\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattServerCallback {} + impl ::std::ops::Deref for BluetoothGattServerCallback { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothGattServerCallback { + /// [BluetoothGattServerCallback](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#BluetoothGattServerCallback()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [onConnectionStateChange](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onConnectionStateChange(android.bluetooth.BluetoothDevice,%20int,%20int)) - pub fn onConnectionStateChange<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onConnectionStateChange", .descriptor == "(Landroid/bluetooth/BluetoothDevice;II)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onConnectionStateChange\0", "(Landroid/bluetooth/BluetoothDevice;II)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onConnectionStateChange](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onConnectionStateChange(android.bluetooth.BluetoothDevice,%20int,%20int)) + pub fn onConnectionStateChange<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onConnectionStateChange", .descriptor == "(Landroid/bluetooth/BluetoothDevice;II)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onConnectionStateChange\0", + "(Landroid/bluetooth/BluetoothDevice;II)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onServiceAdded](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onServiceAdded(int,%20android.bluetooth.BluetoothGattService)) - pub fn onServiceAdded<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattService>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onServiceAdded", .descriptor == "(ILandroid/bluetooth/BluetoothGattService;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onServiceAdded\0", "(ILandroid/bluetooth/BluetoothGattService;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onServiceAdded](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onServiceAdded(int,%20android.bluetooth.BluetoothGattService)) + pub fn onServiceAdded<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onServiceAdded", .descriptor == "(ILandroid/bluetooth/BluetoothGattService;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onServiceAdded\0", + "(ILandroid/bluetooth/BluetoothGattService;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onCharacteristicReadRequest](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onCharacteristicReadRequest(android.bluetooth.BluetoothDevice,%20int,%20int,%20android.bluetooth.BluetoothGattCharacteristic)) - pub fn onCharacteristicReadRequest<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: i32, arg3: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onCharacteristicReadRequest", .descriptor == "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattCharacteristic;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onCharacteristicReadRequest\0", "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattCharacteristic;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onCharacteristicReadRequest](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onCharacteristicReadRequest(android.bluetooth.BluetoothDevice,%20int,%20int,%20android.bluetooth.BluetoothGattCharacteristic)) + pub fn onCharacteristicReadRequest<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + arg3: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onCharacteristicReadRequest", .descriptor == "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattCharacteristic;)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + arg3.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onCharacteristicReadRequest\0", + "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattCharacteristic;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onCharacteristicWriteRequest](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice,%20int,%20android.bluetooth.BluetoothGattCharacteristic,%20boolean,%20boolean,%20int,%20byte%5B%5D)) - pub fn onCharacteristicWriteRequest<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>, arg3: bool, arg4: bool, arg5: i32, arg6: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onCharacteristicWriteRequest", .descriptor == "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattCharacteristic;ZZI[B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3), ::java_spaghetti::AsJValue::as_jvalue(&arg4), ::java_spaghetti::AsJValue::as_jvalue(&arg5), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onCharacteristicWriteRequest\0", "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattCharacteristic;ZZI[B)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onCharacteristicWriteRequest](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice,%20int,%20android.bluetooth.BluetoothGattCharacteristic,%20boolean,%20boolean,%20int,%20byte%5B%5D)) + pub fn onCharacteristicWriteRequest<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: impl ::java_spaghetti::AsArg, + arg3: bool, + arg4: bool, + arg5: i32, + arg6: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onCharacteristicWriteRequest", .descriptor == "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattCharacteristic;ZZI[B)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + arg2.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ::java_spaghetti::AsJValue::as_jvalue(&arg4), + ::java_spaghetti::AsJValue::as_jvalue(&arg5), + arg6.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onCharacteristicWriteRequest\0", + "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattCharacteristic;ZZI[B)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onDescriptorReadRequest](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onDescriptorReadRequest(android.bluetooth.BluetoothDevice,%20int,%20int,%20android.bluetooth.BluetoothGattDescriptor)) - pub fn onDescriptorReadRequest<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: i32, arg3: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattDescriptor>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onDescriptorReadRequest", .descriptor == "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattDescriptor;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onDescriptorReadRequest\0", "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattDescriptor;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onDescriptorReadRequest](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onDescriptorReadRequest(android.bluetooth.BluetoothDevice,%20int,%20int,%20android.bluetooth.BluetoothGattDescriptor)) + pub fn onDescriptorReadRequest<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + arg3: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onDescriptorReadRequest", .descriptor == "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattDescriptor;)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + arg3.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onDescriptorReadRequest\0", + "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattDescriptor;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onDescriptorWriteRequest](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onDescriptorWriteRequest(android.bluetooth.BluetoothDevice,%20int,%20android.bluetooth.BluetoothGattDescriptor,%20boolean,%20boolean,%20int,%20byte%5B%5D)) - pub fn onDescriptorWriteRequest<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattDescriptor>>, arg3: bool, arg4: bool, arg5: i32, arg6: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onDescriptorWriteRequest", .descriptor == "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattDescriptor;ZZI[B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3), ::java_spaghetti::AsJValue::as_jvalue(&arg4), ::java_spaghetti::AsJValue::as_jvalue(&arg5), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onDescriptorWriteRequest\0", "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattDescriptor;ZZI[B)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onDescriptorWriteRequest](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onDescriptorWriteRequest(android.bluetooth.BluetoothDevice,%20int,%20android.bluetooth.BluetoothGattDescriptor,%20boolean,%20boolean,%20int,%20byte%5B%5D)) + pub fn onDescriptorWriteRequest<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: impl ::java_spaghetti::AsArg, + arg3: bool, + arg4: bool, + arg5: i32, + arg6: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onDescriptorWriteRequest", .descriptor == "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattDescriptor;ZZI[B)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + arg2.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ::java_spaghetti::AsJValue::as_jvalue(&arg4), + ::java_spaghetti::AsJValue::as_jvalue(&arg5), + arg6.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onDescriptorWriteRequest\0", + "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattDescriptor;ZZI[B)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onExecuteWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onExecuteWrite(android.bluetooth.BluetoothDevice,%20int,%20boolean)) - pub fn onExecuteWrite<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: bool) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onExecuteWrite", .descriptor == "(Landroid/bluetooth/BluetoothDevice;IZ)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onExecuteWrite\0", "(Landroid/bluetooth/BluetoothDevice;IZ)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onExecuteWrite](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onExecuteWrite(android.bluetooth.BluetoothDevice,%20int,%20boolean)) + pub fn onExecuteWrite<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: bool, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onExecuteWrite", .descriptor == "(Landroid/bluetooth/BluetoothDevice;IZ)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onExecuteWrite\0", + "(Landroid/bluetooth/BluetoothDevice;IZ)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onNotificationSent](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onNotificationSent(android.bluetooth.BluetoothDevice,%20int)) - pub fn onNotificationSent<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onNotificationSent", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onNotificationSent\0", "(Landroid/bluetooth/BluetoothDevice;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onNotificationSent](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onNotificationSent(android.bluetooth.BluetoothDevice,%20int)) + pub fn onNotificationSent<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onNotificationSent", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onNotificationSent\0", + "(Landroid/bluetooth/BluetoothDevice;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onMtuChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onMtuChanged(android.bluetooth.BluetoothDevice,%20int)) - pub fn onMtuChanged<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onMtuChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onMtuChanged\0", "(Landroid/bluetooth/BluetoothDevice;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onMtuChanged](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onMtuChanged(android.bluetooth.BluetoothDevice,%20int)) + pub fn onMtuChanged<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onMtuChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onMtuChanged\0", + "(Landroid/bluetooth/BluetoothDevice;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onPhyUpdate](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onPhyUpdate(android.bluetooth.BluetoothDevice,%20int,%20int,%20int)) - pub fn onPhyUpdate<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: i32, arg3: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onPhyUpdate", .descriptor == "(Landroid/bluetooth/BluetoothDevice;III)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onPhyUpdate\0", "(Landroid/bluetooth/BluetoothDevice;III)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onPhyUpdate](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onPhyUpdate(android.bluetooth.BluetoothDevice,%20int,%20int,%20int)) + pub fn onPhyUpdate<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + arg3: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onPhyUpdate", .descriptor == "(Landroid/bluetooth/BluetoothDevice;III)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onPhyUpdate\0", + "(Landroid/bluetooth/BluetoothDevice;III)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onPhyRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onPhyRead(android.bluetooth.BluetoothDevice,%20int,%20int,%20int)) - pub fn onPhyRead<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: i32, arg3: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onPhyRead", .descriptor == "(Landroid/bluetooth/BluetoothDevice;III)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattServerCallback\0", "onPhyRead\0", "(Landroid/bluetooth/BluetoothDevice;III)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onPhyRead](https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onPhyRead(android.bluetooth.BluetoothDevice,%20int,%20int,%20int)) + pub fn onPhyRead<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: i32, + arg3: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothGattServerCallback", java.flags == PUBLIC, .name == "onPhyRead", .descriptor == "(Landroid/bluetooth/BluetoothDevice;III)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattServerCallback\0", + "onPhyRead\0", + "(Landroid/bluetooth/BluetoothDevice;III)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public class [BluetoothGattService](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html) - public class BluetoothGattService ("android/bluetooth/BluetoothGattService\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub class [BluetoothGattService](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html) + #[repr(transparent)] + pub struct BluetoothGattService(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothGattService {} - /// [BluetoothGattService](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#BluetoothGattService(java.util.UUID,%20int)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>, arg1: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/util/UUID;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "\0", "(Ljava/util/UUID;I)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothGattService { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothGattService\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattService {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothGattService {} + impl ::std::ops::Deref for BluetoothGattService { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothGattService { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothGattService { + /// [BluetoothGattService](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#BluetoothGattService(java.util.UUID,%20int)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/util/UUID;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "\0", + "(Ljava/util/UUID;I)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [addService](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#addService(android.bluetooth.BluetoothGattService)) - pub fn addService<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattService>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "addService", .descriptor == "(Landroid/bluetooth/BluetoothGattService;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "addService\0", "(Landroid/bluetooth/BluetoothGattService;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addService](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#addService(android.bluetooth.BluetoothGattService)) + pub fn addService<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "addService", .descriptor == "(Landroid/bluetooth/BluetoothGattService;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "addService\0", + "(Landroid/bluetooth/BluetoothGattService;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [addCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#addCharacteristic(android.bluetooth.BluetoothGattCharacteristic)) - pub fn addCharacteristic<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothGattCharacteristic>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "addCharacteristic", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "addCharacteristic\0", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#addCharacteristic(android.bluetooth.BluetoothGattCharacteristic)) + pub fn addCharacteristic<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "addCharacteristic", .descriptor == "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "addCharacteristic\0", + "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getUuid](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getUuid()) - pub fn getUuid<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::UUID>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getUuid", .descriptor == "()Ljava/util/UUID;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "getUuid\0", "()Ljava/util/UUID;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getUuid](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getUuid()) + pub fn getUuid<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::UUID>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getUuid", .descriptor == "()Ljava/util/UUID;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "getUuid\0", + "()Ljava/util/UUID;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getInstanceId](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getInstanceId()) - pub fn getInstanceId<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getInstanceId", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "getInstanceId\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getInstanceId](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getInstanceId()) + pub fn getInstanceId<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getInstanceId", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "getInstanceId\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getType](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getType()) - pub fn getType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "getType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getType](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getType()) + pub fn getType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "getType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getIncludedServices](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getIncludedServices()) - pub fn getIncludedServices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getIncludedServices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "getIncludedServices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getIncludedServices](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getIncludedServices()) + pub fn getIncludedServices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getIncludedServices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "getIncludedServices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCharacteristics](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getCharacteristics()) - pub fn getCharacteristics<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getCharacteristics", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "getCharacteristics\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCharacteristics](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getCharacteristics()) + pub fn getCharacteristics<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getCharacteristics", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "getCharacteristics\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getCharacteristic(java.util.UUID)) - pub fn getCharacteristic<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattCharacteristic>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getCharacteristic", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattCharacteristic;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothGattService\0", "getCharacteristic\0", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattCharacteristic;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCharacteristic](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#getCharacteristic(java.util.UUID)) + pub fn getCharacteristic<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothGattCharacteristic>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothGattService", java.flags == PUBLIC, .name == "getCharacteristic", .descriptor == "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattCharacteristic;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothGattService\0", + "getCharacteristic\0", + "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattCharacteristic;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [SERVICE_TYPE_PRIMARY](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#SERVICE_TYPE_PRIMARY) - pub const SERVICE_TYPE_PRIMARY : i32 = 0; + /// public static final [SERVICE_TYPE_PRIMARY](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#SERVICE_TYPE_PRIMARY) + pub const SERVICE_TYPE_PRIMARY: i32 = 0; - /// public static final [SERVICE_TYPE_SECONDARY](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#SERVICE_TYPE_SECONDARY) - pub const SERVICE_TYPE_SECONDARY : i32 = 1; - } + /// public static final [SERVICE_TYPE_SECONDARY](https://developer.android.com/reference/android/bluetooth/BluetoothGattService.html#SERVICE_TYPE_SECONDARY) + pub const SERVICE_TYPE_SECONDARY: i32 = 1; } - ::java_spaghetti::class! { - /// public final class [BluetoothHeadset](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html) - public final class BluetoothHeadset ("android/bluetooth/BluetoothHeadset\0") extends super::super::java::lang::Object, implements BluetoothProfile { + /// pub final class [BluetoothHeadset](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html) + #[repr(transparent)] + pub struct BluetoothHeadset(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothHeadset {} - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#getConnectedDevices()) - pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHeadset\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothHeadset { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothHeadset\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHeadset {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHeadset {} + impl ::std::ops::Deref for BluetoothHeadset { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothHeadset { + fn as_ref(&self) -> &BluetoothProfile { + unsafe { &*(self as *const Self as *const BluetoothProfile) } + } + } + impl BluetoothHeadset { + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#getConnectedDevices()) + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHeadset\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#getDevicesMatchingConnectionStates(int%5B%5D)) - pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHeadset\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#getDevicesMatchingConnectionStates(int%5B%5D)) + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHeadset\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#getConnectionState(android.bluetooth.BluetoothDevice)) - pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHeadset\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#getConnectionState(android.bluetooth.BluetoothDevice)) + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHeadset\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isNoiseReductionSupported](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#isNoiseReductionSupported(android.bluetooth.BluetoothDevice)) - pub fn isNoiseReductionSupported<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "isNoiseReductionSupported", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHeadset\0", "isNoiseReductionSupported\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isNoiseReductionSupported](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#isNoiseReductionSupported(android.bluetooth.BluetoothDevice)) + pub fn isNoiseReductionSupported<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "isNoiseReductionSupported", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHeadset\0", + "isNoiseReductionSupported\0", + "(Landroid/bluetooth/BluetoothDevice;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isVoiceRecognitionSupported](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#isVoiceRecognitionSupported(android.bluetooth.BluetoothDevice)) - pub fn isVoiceRecognitionSupported<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "isVoiceRecognitionSupported", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHeadset\0", "isVoiceRecognitionSupported\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isVoiceRecognitionSupported](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#isVoiceRecognitionSupported(android.bluetooth.BluetoothDevice)) + pub fn isVoiceRecognitionSupported<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "isVoiceRecognitionSupported", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHeadset\0", + "isVoiceRecognitionSupported\0", + "(Landroid/bluetooth/BluetoothDevice;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [startVoiceRecognition](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#startVoiceRecognition(android.bluetooth.BluetoothDevice)) - pub fn startVoiceRecognition<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "startVoiceRecognition", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHeadset\0", "startVoiceRecognition\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [startVoiceRecognition](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#startVoiceRecognition(android.bluetooth.BluetoothDevice)) + pub fn startVoiceRecognition<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "startVoiceRecognition", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHeadset\0", + "startVoiceRecognition\0", + "(Landroid/bluetooth/BluetoothDevice;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [stopVoiceRecognition](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#stopVoiceRecognition(android.bluetooth.BluetoothDevice)) - pub fn stopVoiceRecognition<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "stopVoiceRecognition", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHeadset\0", "stopVoiceRecognition\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [stopVoiceRecognition](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#stopVoiceRecognition(android.bluetooth.BluetoothDevice)) + pub fn stopVoiceRecognition<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "stopVoiceRecognition", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHeadset\0", + "stopVoiceRecognition\0", + "(Landroid/bluetooth/BluetoothDevice;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isAudioConnected](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#isAudioConnected(android.bluetooth.BluetoothDevice)) - pub fn isAudioConnected<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "isAudioConnected", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHeadset\0", "isAudioConnected\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isAudioConnected](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#isAudioConnected(android.bluetooth.BluetoothDevice)) + pub fn isAudioConnected<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "isAudioConnected", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHeadset\0", + "isAudioConnected\0", + "(Landroid/bluetooth/BluetoothDevice;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [sendVendorSpecificResultCode](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#sendVendorSpecificResultCode(android.bluetooth.BluetoothDevice,%20java.lang.String,%20java.lang.String)) - pub fn sendVendorSpecificResultCode<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "sendVendorSpecificResultCode", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHeadset\0", "sendVendorSpecificResultCode\0", "(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [sendVendorSpecificResultCode](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#sendVendorSpecificResultCode(android.bluetooth.BluetoothDevice,%20java.lang.String,%20java.lang.String)) + pub fn sendVendorSpecificResultCode<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHeadset", java.flags == PUBLIC, .name == "sendVendorSpecificResultCode", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue(), arg2.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHeadset\0", + "sendVendorSpecificResultCode\0", + "(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [ACTION_AUDIO_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#ACTION_AUDIO_STATE_CHANGED) - pub const ACTION_AUDIO_STATE_CHANGED : &'static str = "android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED"; + /// public static final [ACTION_AUDIO_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#ACTION_AUDIO_STATE_CHANGED) + pub const ACTION_AUDIO_STATE_CHANGED: &'static str = + "android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED"; - /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#ACTION_CONNECTION_STATE_CHANGED) - pub const ACTION_CONNECTION_STATE_CHANGED : &'static str = "android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED"; + /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#ACTION_CONNECTION_STATE_CHANGED) + pub const ACTION_CONNECTION_STATE_CHANGED: &'static str = + "android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED"; - /// public static final [ACTION_VENDOR_SPECIFIC_HEADSET_EVENT](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#ACTION_VENDOR_SPECIFIC_HEADSET_EVENT) - pub const ACTION_VENDOR_SPECIFIC_HEADSET_EVENT : &'static str = "android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT"; + /// public static final [ACTION_VENDOR_SPECIFIC_HEADSET_EVENT](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#ACTION_VENDOR_SPECIFIC_HEADSET_EVENT) + pub const ACTION_VENDOR_SPECIFIC_HEADSET_EVENT: &'static str = + "android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT"; - /// public static final [AT_CMD_TYPE_ACTION](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_ACTION) - pub const AT_CMD_TYPE_ACTION : i32 = 4; + /// public static final [AT_CMD_TYPE_ACTION](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_ACTION) + pub const AT_CMD_TYPE_ACTION: i32 = 4; - /// public static final [AT_CMD_TYPE_BASIC](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_BASIC) - pub const AT_CMD_TYPE_BASIC : i32 = 3; + /// public static final [AT_CMD_TYPE_BASIC](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_BASIC) + pub const AT_CMD_TYPE_BASIC: i32 = 3; - /// public static final [AT_CMD_TYPE_READ](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_READ) - pub const AT_CMD_TYPE_READ : i32 = 0; + /// public static final [AT_CMD_TYPE_READ](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_READ) + pub const AT_CMD_TYPE_READ: i32 = 0; - /// public static final [AT_CMD_TYPE_SET](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_SET) - pub const AT_CMD_TYPE_SET : i32 = 2; + /// public static final [AT_CMD_TYPE_SET](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_SET) + pub const AT_CMD_TYPE_SET: i32 = 2; - /// public static final [AT_CMD_TYPE_TEST](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_TEST) - pub const AT_CMD_TYPE_TEST : i32 = 1; + /// public static final [AT_CMD_TYPE_TEST](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#AT_CMD_TYPE_TEST) + pub const AT_CMD_TYPE_TEST: i32 = 1; - /// public static final [EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS) - pub const EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS : &'static str = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_ARGS"; + /// public static final [EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS) + pub const EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS: &'static str = + "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_ARGS"; - /// public static final [EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD) - pub const EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD : &'static str = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD"; + /// public static final [EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD) + pub const EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD: &'static str = + "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD"; - /// public static final [EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE) - pub const EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE : &'static str = "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE"; + /// public static final [EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE) + pub const EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE: &'static str = + "android.bluetooth.headset.extra.VENDOR_SPECIFIC_HEADSET_EVENT_CMD_TYPE"; - /// public static final [STATE_AUDIO_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_CONNECTED) - pub const STATE_AUDIO_CONNECTED : i32 = 12; + /// public static final [STATE_AUDIO_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_CONNECTED) + pub const STATE_AUDIO_CONNECTED: i32 = 12; - /// public static final [STATE_AUDIO_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_CONNECTING) - pub const STATE_AUDIO_CONNECTING : i32 = 11; + /// public static final [STATE_AUDIO_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_CONNECTING) + pub const STATE_AUDIO_CONNECTING: i32 = 11; - /// public static final [STATE_AUDIO_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_DISCONNECTED) - pub const STATE_AUDIO_DISCONNECTED : i32 = 10; + /// public static final [STATE_AUDIO_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#STATE_AUDIO_DISCONNECTED) + pub const STATE_AUDIO_DISCONNECTED: i32 = 10; - /// public static final [VENDOR_RESULT_CODE_COMMAND_ANDROID](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#VENDOR_RESULT_CODE_COMMAND_ANDROID) - pub const VENDOR_RESULT_CODE_COMMAND_ANDROID : &'static str = "+ANDROID"; + /// public static final [VENDOR_RESULT_CODE_COMMAND_ANDROID](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#VENDOR_RESULT_CODE_COMMAND_ANDROID) + pub const VENDOR_RESULT_CODE_COMMAND_ANDROID: &'static str = "+ANDROID"; - /// public static final [VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY) - pub const VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY : &'static str = "android.bluetooth.headset.intent.category.companyid"; - } + /// public static final [VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY](https://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY) + pub const VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY: &'static str = + "android.bluetooth.headset.intent.category.companyid"; } - ::java_spaghetti::class! { - /// public final class [BluetoothHealth](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html) - #[deprecated] public final class BluetoothHealth ("android/bluetooth/BluetoothHealth\0") extends super::super::java::lang::Object, implements BluetoothProfile { + /// pub final class [BluetoothHealth](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html) + #[repr(transparent)] + #[deprecated] + pub struct BluetoothHealth(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothHealth {} - /// [registerSinkAppConfiguration](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#registerSinkAppConfiguration(java.lang.String,%20int,%20android.bluetooth.BluetoothHealthCallback)) - #[deprecated] pub fn registerSinkAppConfiguration<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>, arg1: i32, arg2: impl ::std::convert::Into<::std::option::Option<&'env BluetoothHealthCallback>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "registerSinkAppConfiguration", .descriptor == "(Ljava/lang/String;ILandroid/bluetooth/BluetoothHealthCallback;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealth\0", "registerSinkAppConfiguration\0", "(Ljava/lang/String;ILandroid/bluetooth/BluetoothHealthCallback;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothHealth { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothHealth\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHealth {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHealth {} + impl ::std::ops::Deref for BluetoothHealth { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothHealth { + fn as_ref(&self) -> &BluetoothProfile { + unsafe { &*(self as *const Self as *const BluetoothProfile) } + } + } + impl BluetoothHealth { + /// [registerSinkAppConfiguration](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#registerSinkAppConfiguration(java.lang.String,%20int,%20android.bluetooth.BluetoothHealthCallback)) + #[deprecated] + pub fn registerSinkAppConfiguration<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "registerSinkAppConfiguration", .descriptor == "(Ljava/lang/String;ILandroid/bluetooth/BluetoothHealthCallback;)Z" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + arg2.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealth\0", + "registerSinkAppConfiguration\0", + "(Ljava/lang/String;ILandroid/bluetooth/BluetoothHealthCallback;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [unregisterAppConfiguration](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#unregisterAppConfiguration(android.bluetooth.BluetoothHealthAppConfiguration)) - #[deprecated] pub fn unregisterAppConfiguration<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothHealthAppConfiguration>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "unregisterAppConfiguration", .descriptor == "(Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealth\0", "unregisterAppConfiguration\0", "(Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [unregisterAppConfiguration](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#unregisterAppConfiguration(android.bluetooth.BluetoothHealthAppConfiguration)) + #[deprecated] + pub fn unregisterAppConfiguration<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "unregisterAppConfiguration", .descriptor == "(Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealth\0", + "unregisterAppConfiguration\0", + "(Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [connectChannelToSource](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#connectChannelToSource(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothHealthAppConfiguration)) - #[deprecated] pub fn connectChannelToSource<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothHealthAppConfiguration>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "connectChannelToSource", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealth\0", "connectChannelToSource\0", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [connectChannelToSource](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#connectChannelToSource(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothHealthAppConfiguration)) + #[deprecated] + pub fn connectChannelToSource<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "connectChannelToSource", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealth\0", + "connectChannelToSource\0", + "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [disconnectChannel](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#disconnectChannel(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothHealthAppConfiguration,%20int)) - #[deprecated] pub fn disconnectChannel<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothHealthAppConfiguration>>, arg2: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "disconnectChannel", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealth\0", "disconnectChannel\0", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [disconnectChannel](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#disconnectChannel(android.bluetooth.BluetoothDevice,%20android.bluetooth.BluetoothHealthAppConfiguration,%20int)) + #[deprecated] + pub fn disconnectChannel<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "disconnectChannel", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealth\0", + "disconnectChannel\0", + "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#getConnectionState(android.bluetooth.BluetoothDevice)) - #[deprecated] pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealth\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#getConnectionState(android.bluetooth.BluetoothDevice)) + #[deprecated] + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealth\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#getConnectedDevices()) - #[deprecated] pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealth\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#getConnectedDevices()) + #[deprecated] + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealth\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#getDevicesMatchingConnectionStates(int%5B%5D)) - #[deprecated] pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealth\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#getDevicesMatchingConnectionStates(int%5B%5D)) + #[deprecated] + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHealth", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealth\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [APP_CONFIG_REGISTRATION_FAILURE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_REGISTRATION_FAILURE) - #[deprecated] pub const APP_CONFIG_REGISTRATION_FAILURE : i32 = 1; + /// public static final [APP_CONFIG_REGISTRATION_FAILURE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_REGISTRATION_FAILURE) + #[deprecated] + pub const APP_CONFIG_REGISTRATION_FAILURE: i32 = 1; - /// public static final [APP_CONFIG_REGISTRATION_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_REGISTRATION_SUCCESS) - #[deprecated] pub const APP_CONFIG_REGISTRATION_SUCCESS : i32 = 0; + /// public static final [APP_CONFIG_REGISTRATION_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_REGISTRATION_SUCCESS) + #[deprecated] + pub const APP_CONFIG_REGISTRATION_SUCCESS: i32 = 0; - /// public static final [APP_CONFIG_UNREGISTRATION_FAILURE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_UNREGISTRATION_FAILURE) - #[deprecated] pub const APP_CONFIG_UNREGISTRATION_FAILURE : i32 = 3; + /// public static final [APP_CONFIG_UNREGISTRATION_FAILURE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_UNREGISTRATION_FAILURE) + #[deprecated] + pub const APP_CONFIG_UNREGISTRATION_FAILURE: i32 = 3; - /// public static final [APP_CONFIG_UNREGISTRATION_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_UNREGISTRATION_SUCCESS) - #[deprecated] pub const APP_CONFIG_UNREGISTRATION_SUCCESS : i32 = 2; + /// public static final [APP_CONFIG_UNREGISTRATION_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#APP_CONFIG_UNREGISTRATION_SUCCESS) + #[deprecated] + pub const APP_CONFIG_UNREGISTRATION_SUCCESS: i32 = 2; - /// public static final [CHANNEL_TYPE_RELIABLE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#CHANNEL_TYPE_RELIABLE) - #[deprecated] pub const CHANNEL_TYPE_RELIABLE : i32 = 10; + /// public static final [CHANNEL_TYPE_RELIABLE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#CHANNEL_TYPE_RELIABLE) + #[deprecated] + pub const CHANNEL_TYPE_RELIABLE: i32 = 10; - /// public static final [CHANNEL_TYPE_STREAMING](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#CHANNEL_TYPE_STREAMING) - #[deprecated] pub const CHANNEL_TYPE_STREAMING : i32 = 11; + /// public static final [CHANNEL_TYPE_STREAMING](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#CHANNEL_TYPE_STREAMING) + #[deprecated] + pub const CHANNEL_TYPE_STREAMING: i32 = 11; - /// public static final [SINK_ROLE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#SINK_ROLE) - #[deprecated] pub const SINK_ROLE : i32 = 2; + /// public static final [SINK_ROLE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#SINK_ROLE) + #[deprecated] + pub const SINK_ROLE: i32 = 2; - /// public static final [SOURCE_ROLE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#SOURCE_ROLE) - #[deprecated] pub const SOURCE_ROLE : i32 = 1; + /// public static final [SOURCE_ROLE](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#SOURCE_ROLE) + #[deprecated] + pub const SOURCE_ROLE: i32 = 1; - /// public static final [STATE_CHANNEL_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_CONNECTED) - #[deprecated] pub const STATE_CHANNEL_CONNECTED : i32 = 2; + /// public static final [STATE_CHANNEL_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_CONNECTED) + #[deprecated] + pub const STATE_CHANNEL_CONNECTED: i32 = 2; - /// public static final [STATE_CHANNEL_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_CONNECTING) - #[deprecated] pub const STATE_CHANNEL_CONNECTING : i32 = 1; + /// public static final [STATE_CHANNEL_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_CONNECTING) + #[deprecated] + pub const STATE_CHANNEL_CONNECTING: i32 = 1; - /// public static final [STATE_CHANNEL_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_DISCONNECTED) - #[deprecated] pub const STATE_CHANNEL_DISCONNECTED : i32 = 0; + /// public static final [STATE_CHANNEL_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_DISCONNECTED) + #[deprecated] + pub const STATE_CHANNEL_DISCONNECTED: i32 = 0; - /// public static final [STATE_CHANNEL_DISCONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_DISCONNECTING) - #[deprecated] pub const STATE_CHANNEL_DISCONNECTING : i32 = 3; - } + /// public static final [STATE_CHANNEL_DISCONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothHealth.html#STATE_CHANNEL_DISCONNECTING) + #[deprecated] + pub const STATE_CHANNEL_DISCONNECTING: i32 = 3; } - ::java_spaghetti::class! { - /// public final class [BluetoothHealthAppConfiguration](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html) - #[deprecated] public final class BluetoothHealthAppConfiguration ("android/bluetooth/BluetoothHealthAppConfiguration\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub final class [BluetoothHealthAppConfiguration](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html) + #[repr(transparent)] + #[deprecated] + pub struct BluetoothHealthAppConfiguration(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothHealthAppConfiguration {} - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html#describeContents()) - #[deprecated] pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHealthAppConfiguration", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealthAppConfiguration\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothHealthAppConfiguration { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothHealthAppConfiguration\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHealthAppConfiguration {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHealthAppConfiguration {} + impl ::std::ops::Deref for BluetoothHealthAppConfiguration { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothHealthAppConfiguration { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothHealthAppConfiguration { + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html#describeContents()) + #[deprecated] + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHealthAppConfiguration", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealthAppConfiguration\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDataType](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html#getDataType()) - #[deprecated] pub fn getDataType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHealthAppConfiguration", java.flags == PUBLIC, .name == "getDataType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealthAppConfiguration\0", "getDataType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDataType](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html#getDataType()) + #[deprecated] + pub fn getDataType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHealthAppConfiguration", java.flags == PUBLIC, .name == "getDataType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealthAppConfiguration\0", + "getDataType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getName](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html#getName()) - #[deprecated] pub fn getName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHealthAppConfiguration", java.flags == PUBLIC, .name == "getName", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealthAppConfiguration\0", "getName\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getName](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html#getName()) + #[deprecated] + pub fn getName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHealthAppConfiguration", java.flags == PUBLIC, .name == "getName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealthAppConfiguration\0", + "getName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getRole](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html#getRole()) - #[deprecated] pub fn getRole<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHealthAppConfiguration", java.flags == PUBLIC, .name == "getRole", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealthAppConfiguration\0", "getRole\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getRole](https://developer.android.com/reference/android/bluetooth/BluetoothHealthAppConfiguration.html#getRole()) + #[deprecated] + pub fn getRole<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHealthAppConfiguration", java.flags == PUBLIC, .name == "getRole", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealthAppConfiguration\0", + "getRole\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public class [BluetoothHealthCallback](https://developer.android.com/reference/android/bluetooth/BluetoothHealthCallback.html) - #[deprecated] public class BluetoothHealthCallback ("android/bluetooth/BluetoothHealthCallback\0") extends super::super::java::lang::Object { + /// pub class [BluetoothHealthCallback](https://developer.android.com/reference/android/bluetooth/BluetoothHealthCallback.html) + #[repr(transparent)] + #[deprecated] + pub struct BluetoothHealthCallback(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothHealthCallback {} - /// [BluetoothHealthCallback](https://developer.android.com/reference/android/bluetooth/BluetoothHealthCallback.html#BluetoothHealthCallback()) - #[deprecated] pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHealthCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealthCallback\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothHealthCallback { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothHealthCallback\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHealthCallback {} + impl ::std::ops::Deref for BluetoothHealthCallback { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothHealthCallback { + /// [BluetoothHealthCallback](https://developer.android.com/reference/android/bluetooth/BluetoothHealthCallback.html#BluetoothHealthCallback()) + #[deprecated] + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHealthCallback", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealthCallback\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [onHealthAppConfigurationStatusChange](https://developer.android.com/reference/android/bluetooth/BluetoothHealthCallback.html#onHealthAppConfigurationStatusChange(android.bluetooth.BluetoothHealthAppConfiguration,%20int)) - #[deprecated] pub fn onHealthAppConfigurationStatusChange<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothHealthAppConfiguration>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHealthCallback", java.flags == PUBLIC, .name == "onHealthAppConfigurationStatusChange", .descriptor == "(Landroid/bluetooth/BluetoothHealthAppConfiguration;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHealthCallback\0", "onHealthAppConfigurationStatusChange\0", "(Landroid/bluetooth/BluetoothHealthAppConfiguration;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onHealthAppConfigurationStatusChange](https://developer.android.com/reference/android/bluetooth/BluetoothHealthCallback.html#onHealthAppConfigurationStatusChange(android.bluetooth.BluetoothHealthAppConfiguration,%20int)) + #[deprecated] + pub fn onHealthAppConfigurationStatusChange<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothHealthCallback", java.flags == PUBLIC, .name == "onHealthAppConfigurationStatusChange", .descriptor == "(Landroid/bluetooth/BluetoothHealthAppConfiguration;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHealthCallback\0", + "onHealthAppConfigurationStatusChange\0", + "(Landroid/bluetooth/BluetoothHealthAppConfiguration;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [BluetoothHearingAid](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html) - public final class BluetoothHearingAid ("android/bluetooth/BluetoothHearingAid\0") extends super::super::java::lang::Object, implements BluetoothProfile { + /// pub final class [BluetoothHearingAid](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html) + #[repr(transparent)] + pub struct BluetoothHearingAid(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothHearingAid {} - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html#getConnectedDevices()) - pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHearingAid", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHearingAid\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothHearingAid { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothHearingAid\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHearingAid {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHearingAid {} + impl ::std::ops::Deref for BluetoothHearingAid { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothHearingAid { + fn as_ref(&self) -> &BluetoothProfile { + unsafe { &*(self as *const Self as *const BluetoothProfile) } + } + } + impl BluetoothHearingAid { + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html#getConnectedDevices()) + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHearingAid", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHearingAid\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html#getDevicesMatchingConnectionStates(int%5B%5D)) - pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHearingAid", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHearingAid\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html#getDevicesMatchingConnectionStates(int%5B%5D)) + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHearingAid", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHearingAid\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html#getConnectionState(android.bluetooth.BluetoothDevice)) - pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHearingAid", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHearingAid\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html#getConnectionState(android.bluetooth.BluetoothDevice)) + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHearingAid", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHearingAid\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } - - /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html#ACTION_CONNECTION_STATE_CHANGED) - pub const ACTION_CONNECTION_STATE_CHANGED : &'static str = "android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED"; } + + /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHearingAid.html#ACTION_CONNECTION_STATE_CHANGED) + pub const ACTION_CONNECTION_STATE_CHANGED: &'static str = + "android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED"; } - ::java_spaghetti::class! { - /// public final class [BluetoothHidDevice](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html) - public final class BluetoothHidDevice ("android/bluetooth/BluetoothHidDevice\0") extends super::super::java::lang::Object, implements BluetoothProfile { + /// pub final class [BluetoothHidDevice](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html) + #[repr(transparent)] + pub struct BluetoothHidDevice(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothHidDevice {} - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#getConnectedDevices()) - pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothHidDevice { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothHidDevice\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHidDevice {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHidDevice {} + impl ::std::ops::Deref for BluetoothHidDevice { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothHidDevice { + fn as_ref(&self) -> &BluetoothProfile { + unsafe { &*(self as *const Self as *const BluetoothProfile) } + } + } + impl BluetoothHidDevice { + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#getConnectedDevices()) + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#getDevicesMatchingConnectionStates(int%5B%5D)) - pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#getDevicesMatchingConnectionStates(int%5B%5D)) + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#getConnectionState(android.bluetooth.BluetoothDevice)) - pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#getConnectionState(android.bluetooth.BluetoothDevice)) + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [unregisterApp](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#unregisterApp()) - pub fn unregisterApp<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "unregisterApp", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "unregisterApp\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [unregisterApp](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#unregisterApp()) + pub fn unregisterApp<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "unregisterApp", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice\0", + "unregisterApp\0", + "()Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [sendReport](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#sendReport(android.bluetooth.BluetoothDevice,%20int,%20byte%5B%5D)) - pub fn sendReport<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "sendReport", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I[B)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "sendReport\0", "(Landroid/bluetooth/BluetoothDevice;I[B)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [sendReport](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#sendReport(android.bluetooth.BluetoothDevice,%20int,%20byte%5B%5D)) + pub fn sendReport<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "sendReport", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I[B)Z" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + arg2.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice\0", + "sendReport\0", + "(Landroid/bluetooth/BluetoothDevice;I[B)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [replyReport](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#replyReport(android.bluetooth.BluetoothDevice,%20byte,%20byte,%20byte%5B%5D)) - pub fn replyReport<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i8, arg2: i8, arg3: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "replyReport", .descriptor == "(Landroid/bluetooth/BluetoothDevice;BB[B)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "replyReport\0", "(Landroid/bluetooth/BluetoothDevice;BB[B)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [replyReport](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#replyReport(android.bluetooth.BluetoothDevice,%20byte,%20byte,%20byte%5B%5D)) + pub fn replyReport<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i8, + arg2: i8, + arg3: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "replyReport", .descriptor == "(Landroid/bluetooth/BluetoothDevice;BB[B)Z" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + arg3.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice\0", + "replyReport\0", + "(Landroid/bluetooth/BluetoothDevice;BB[B)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [reportError](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#reportError(android.bluetooth.BluetoothDevice,%20byte)) - pub fn reportError<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i8) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "reportError", .descriptor == "(Landroid/bluetooth/BluetoothDevice;B)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "reportError\0", "(Landroid/bluetooth/BluetoothDevice;B)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [reportError](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#reportError(android.bluetooth.BluetoothDevice,%20byte)) + pub fn reportError<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i8, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "reportError", .descriptor == "(Landroid/bluetooth/BluetoothDevice;B)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice\0", + "reportError\0", + "(Landroid/bluetooth/BluetoothDevice;B)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [connect](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#connect(android.bluetooth.BluetoothDevice)) - pub fn connect<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "connect", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "connect\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [connect](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#connect(android.bluetooth.BluetoothDevice)) + pub fn connect<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "connect", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice\0", + "connect\0", + "(Landroid/bluetooth/BluetoothDevice;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [disconnect](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#disconnect(android.bluetooth.BluetoothDevice)) - pub fn disconnect<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "disconnect", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice\0", "disconnect\0", "(Landroid/bluetooth/BluetoothDevice;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [disconnect](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#disconnect(android.bluetooth.BluetoothDevice)) + pub fn disconnect<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDevice", java.flags == PUBLIC, .name == "disconnect", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice\0", + "disconnect\0", + "(Landroid/bluetooth/BluetoothDevice;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ACTION_CONNECTION_STATE_CHANGED) - pub const ACTION_CONNECTION_STATE_CHANGED : &'static str = "android.bluetooth.hiddevice.profile.action.CONNECTION_STATE_CHANGED"; + /// public static final [ACTION_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ACTION_CONNECTION_STATE_CHANGED) + pub const ACTION_CONNECTION_STATE_CHANGED: &'static str = + "android.bluetooth.hiddevice.profile.action.CONNECTION_STATE_CHANGED"; - /// public static final [ERROR_RSP_INVALID_PARAM](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_INVALID_PARAM) - pub const ERROR_RSP_INVALID_PARAM : i8 = 4; + /// public static final [ERROR_RSP_INVALID_PARAM](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_INVALID_PARAM) + pub const ERROR_RSP_INVALID_PARAM: i8 = 4; - /// public static final [ERROR_RSP_INVALID_RPT_ID](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_INVALID_RPT_ID) - pub const ERROR_RSP_INVALID_RPT_ID : i8 = 2; + /// public static final [ERROR_RSP_INVALID_RPT_ID](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_INVALID_RPT_ID) + pub const ERROR_RSP_INVALID_RPT_ID: i8 = 2; - /// public static final [ERROR_RSP_NOT_READY](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_NOT_READY) - pub const ERROR_RSP_NOT_READY : i8 = 1; + /// public static final [ERROR_RSP_NOT_READY](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_NOT_READY) + pub const ERROR_RSP_NOT_READY: i8 = 1; - /// public static final [ERROR_RSP_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_SUCCESS) - pub const ERROR_RSP_SUCCESS : i8 = 0; + /// public static final [ERROR_RSP_SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_SUCCESS) + pub const ERROR_RSP_SUCCESS: i8 = 0; - /// public static final [ERROR_RSP_UNKNOWN](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_UNKNOWN) - pub const ERROR_RSP_UNKNOWN : i8 = 14; + /// public static final [ERROR_RSP_UNKNOWN](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_UNKNOWN) + pub const ERROR_RSP_UNKNOWN: i8 = 14; - /// public static final [ERROR_RSP_UNSUPPORTED_REQ](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_UNSUPPORTED_REQ) - pub const ERROR_RSP_UNSUPPORTED_REQ : i8 = 3; + /// public static final [ERROR_RSP_UNSUPPORTED_REQ](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#ERROR_RSP_UNSUPPORTED_REQ) + pub const ERROR_RSP_UNSUPPORTED_REQ: i8 = 3; - /// public static final [PROTOCOL_BOOT_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#PROTOCOL_BOOT_MODE) - pub const PROTOCOL_BOOT_MODE : i8 = 0; + /// public static final [PROTOCOL_BOOT_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#PROTOCOL_BOOT_MODE) + pub const PROTOCOL_BOOT_MODE: i8 = 0; - /// public static final [PROTOCOL_REPORT_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#PROTOCOL_REPORT_MODE) - pub const PROTOCOL_REPORT_MODE : i8 = 1; + /// public static final [PROTOCOL_REPORT_MODE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#PROTOCOL_REPORT_MODE) + pub const PROTOCOL_REPORT_MODE: i8 = 1; - /// public static final [REPORT_TYPE_FEATURE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#REPORT_TYPE_FEATURE) - pub const REPORT_TYPE_FEATURE : i8 = 3; + /// public static final [REPORT_TYPE_FEATURE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#REPORT_TYPE_FEATURE) + pub const REPORT_TYPE_FEATURE: i8 = 3; - /// public static final [REPORT_TYPE_INPUT](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#REPORT_TYPE_INPUT) - pub const REPORT_TYPE_INPUT : i8 = 1; + /// public static final [REPORT_TYPE_INPUT](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#REPORT_TYPE_INPUT) + pub const REPORT_TYPE_INPUT: i8 = 1; - /// public static final [REPORT_TYPE_OUTPUT](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#REPORT_TYPE_OUTPUT) - pub const REPORT_TYPE_OUTPUT : i8 = 2; + /// public static final [REPORT_TYPE_OUTPUT](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#REPORT_TYPE_OUTPUT) + pub const REPORT_TYPE_OUTPUT: i8 = 2; - /// public static final [SUBCLASS1_COMBO](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS1_COMBO) - pub const SUBCLASS1_COMBO : i8 = -64; + /// public static final [SUBCLASS1_COMBO](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS1_COMBO) + pub const SUBCLASS1_COMBO: i8 = -64; - /// public static final [SUBCLASS1_KEYBOARD](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS1_KEYBOARD) - pub const SUBCLASS1_KEYBOARD : i8 = 64; + /// public static final [SUBCLASS1_KEYBOARD](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS1_KEYBOARD) + pub const SUBCLASS1_KEYBOARD: i8 = 64; - /// public static final [SUBCLASS1_MOUSE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS1_MOUSE) - pub const SUBCLASS1_MOUSE : i8 = -128; + /// public static final [SUBCLASS1_MOUSE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS1_MOUSE) + pub const SUBCLASS1_MOUSE: i8 = -128; - /// public static final [SUBCLASS1_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS1_NONE) - pub const SUBCLASS1_NONE : i8 = 0; + /// public static final [SUBCLASS1_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS1_NONE) + pub const SUBCLASS1_NONE: i8 = 0; - /// public static final [SUBCLASS2_CARD_READER](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_CARD_READER) - pub const SUBCLASS2_CARD_READER : i8 = 6; + /// public static final [SUBCLASS2_CARD_READER](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_CARD_READER) + pub const SUBCLASS2_CARD_READER: i8 = 6; - /// public static final [SUBCLASS2_DIGITIZER_TABLET](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_DIGITIZER_TABLET) - pub const SUBCLASS2_DIGITIZER_TABLET : i8 = 5; + /// public static final [SUBCLASS2_DIGITIZER_TABLET](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_DIGITIZER_TABLET) + pub const SUBCLASS2_DIGITIZER_TABLET: i8 = 5; - /// public static final [SUBCLASS2_GAMEPAD](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_GAMEPAD) - pub const SUBCLASS2_GAMEPAD : i8 = 2; + /// public static final [SUBCLASS2_GAMEPAD](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_GAMEPAD) + pub const SUBCLASS2_GAMEPAD: i8 = 2; - /// public static final [SUBCLASS2_JOYSTICK](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_JOYSTICK) - pub const SUBCLASS2_JOYSTICK : i8 = 1; + /// public static final [SUBCLASS2_JOYSTICK](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_JOYSTICK) + pub const SUBCLASS2_JOYSTICK: i8 = 1; - /// public static final [SUBCLASS2_REMOTE_CONTROL](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_REMOTE_CONTROL) - pub const SUBCLASS2_REMOTE_CONTROL : i8 = 3; + /// public static final [SUBCLASS2_REMOTE_CONTROL](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_REMOTE_CONTROL) + pub const SUBCLASS2_REMOTE_CONTROL: i8 = 3; - /// public static final [SUBCLASS2_SENSING_DEVICE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_SENSING_DEVICE) - pub const SUBCLASS2_SENSING_DEVICE : i8 = 4; + /// public static final [SUBCLASS2_SENSING_DEVICE](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_SENSING_DEVICE) + pub const SUBCLASS2_SENSING_DEVICE: i8 = 4; - /// public static final [SUBCLASS2_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_UNCATEGORIZED) - pub const SUBCLASS2_UNCATEGORIZED : i8 = 0; - } + /// public static final [SUBCLASS2_UNCATEGORIZED](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.html#SUBCLASS2_UNCATEGORIZED) + pub const SUBCLASS2_UNCATEGORIZED: i8 = 0; } - ::java_spaghetti::class! { - /// public final class [BluetoothHidDeviceAppQosSettings](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html) - public final class BluetoothHidDeviceAppQosSettings ("android/bluetooth/BluetoothHidDeviceAppQosSettings\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub final class [BluetoothHidDeviceAppQosSettings](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html) + #[repr(transparent)] + pub struct BluetoothHidDeviceAppQosSettings(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothHidDeviceAppQosSettings {} - /// [BluetoothHidDeviceAppQosSettings](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#BluetoothHidDeviceAppQosSettings(int,%20int,%20int,%20int,%20int,%20int)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: i32, arg1: i32, arg2: i32, arg3: i32, arg4: i32, arg5: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "", .descriptor == "(IIIIII)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3), ::java_spaghetti::AsJValue::as_jvalue(&arg4), ::java_spaghetti::AsJValue::as_jvalue(&arg5)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppQosSettings\0", "\0", "(IIIIII)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothHidDeviceAppQosSettings { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothHidDeviceAppQosSettings\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHidDeviceAppQosSettings {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHidDeviceAppQosSettings {} + impl ::std::ops::Deref for BluetoothHidDeviceAppQosSettings { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothHidDeviceAppQosSettings { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothHidDeviceAppQosSettings { + /// [BluetoothHidDeviceAppQosSettings](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#BluetoothHidDeviceAppQosSettings(int,%20int,%20int,%20int,%20int,%20int)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: i32, + arg1: i32, + arg2: i32, + arg3: i32, + arg4: i32, + arg5: i32, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "", .descriptor == "(IIIIII)V" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ::java_spaghetti::AsJValue::as_jvalue(&arg4), + ::java_spaghetti::AsJValue::as_jvalue(&arg5), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppQosSettings\0", + "\0", + "(IIIIII)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [getServiceType](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getServiceType()) - pub fn getServiceType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getServiceType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppQosSettings\0", "getServiceType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getServiceType](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getServiceType()) + pub fn getServiceType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getServiceType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppQosSettings\0", + "getServiceType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getTokenRate](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getTokenRate()) - pub fn getTokenRate<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getTokenRate", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppQosSettings\0", "getTokenRate\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getTokenRate](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getTokenRate()) + pub fn getTokenRate<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getTokenRate", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppQosSettings\0", + "getTokenRate\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getTokenBucketSize](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getTokenBucketSize()) - pub fn getTokenBucketSize<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getTokenBucketSize", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppQosSettings\0", "getTokenBucketSize\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getTokenBucketSize](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getTokenBucketSize()) + pub fn getTokenBucketSize<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getTokenBucketSize", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppQosSettings\0", + "getTokenBucketSize\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getPeakBandwidth](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getPeakBandwidth()) - pub fn getPeakBandwidth<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getPeakBandwidth", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppQosSettings\0", "getPeakBandwidth\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getPeakBandwidth](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getPeakBandwidth()) + pub fn getPeakBandwidth<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getPeakBandwidth", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppQosSettings\0", + "getPeakBandwidth\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getLatency](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getLatency()) - pub fn getLatency<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getLatency", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppQosSettings\0", "getLatency\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getLatency](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getLatency()) + pub fn getLatency<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getLatency", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppQosSettings\0", + "getLatency\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDelayVariation](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getDelayVariation()) - pub fn getDelayVariation<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getDelayVariation", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppQosSettings\0", "getDelayVariation\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDelayVariation](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#getDelayVariation()) + pub fn getDelayVariation<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "getDelayVariation", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppQosSettings\0", + "getDelayVariation\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppQosSettings\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDeviceAppQosSettings", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppQosSettings\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [MAX](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#MAX) - pub const MAX : i32 = -1; + /// public static final [MAX](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#MAX) + pub const MAX: i32 = -1; - /// public static final [SERVICE_BEST_EFFORT](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#SERVICE_BEST_EFFORT) - pub const SERVICE_BEST_EFFORT : i32 = 1; + /// public static final [SERVICE_BEST_EFFORT](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#SERVICE_BEST_EFFORT) + pub const SERVICE_BEST_EFFORT: i32 = 1; - /// public static final [SERVICE_GUARANTEED](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#SERVICE_GUARANTEED) - pub const SERVICE_GUARANTEED : i32 = 2; + /// public static final [SERVICE_GUARANTEED](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#SERVICE_GUARANTEED) + pub const SERVICE_GUARANTEED: i32 = 2; - /// public static final [SERVICE_NO_TRAFFIC](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#SERVICE_NO_TRAFFIC) - pub const SERVICE_NO_TRAFFIC : i32 = 0; - } + /// public static final [SERVICE_NO_TRAFFIC](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppQosSettings.html#SERVICE_NO_TRAFFIC) + pub const SERVICE_NO_TRAFFIC: i32 = 0; } - ::java_spaghetti::class! { - /// public final class [BluetoothHidDeviceAppSdpSettings](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html) - public final class BluetoothHidDeviceAppSdpSettings ("android/bluetooth/BluetoothHidDeviceAppSdpSettings\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub final class [BluetoothHidDeviceAppSdpSettings](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html) + #[repr(transparent)] + pub struct BluetoothHidDeviceAppSdpSettings(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothHidDeviceAppSdpSettings {} - /// [BluetoothHidDeviceAppSdpSettings](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#BluetoothHidDeviceAppSdpSettings(java.lang.String,%20java.lang.String,%20java.lang.String,%20byte,%20byte%5B%5D)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>, arg3: i8, arg4: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;B[B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", "\0", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;B[B)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothHidDeviceAppSdpSettings { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothHidDeviceAppSdpSettings\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHidDeviceAppSdpSettings {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHidDeviceAppSdpSettings {} + impl ::std::ops::Deref for BluetoothHidDeviceAppSdpSettings { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothHidDeviceAppSdpSettings { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothHidDeviceAppSdpSettings { + /// [BluetoothHidDeviceAppSdpSettings](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#BluetoothHidDeviceAppSdpSettings(java.lang.String,%20java.lang.String,%20java.lang.String,%20byte,%20byte%5B%5D)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: i8, + arg4: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;B[B)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + arg4.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", + "\0", + "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;B[B)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [getName](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getName()) - pub fn getName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getName", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", "getName\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getName](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getName()) + pub fn getName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", + "getName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDescription](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getDescription()) - pub fn getDescription<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getDescription", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", "getDescription\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDescription](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getDescription()) + pub fn getDescription<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getDescription", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", + "getDescription\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getProvider](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getProvider()) - pub fn getProvider<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getProvider", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", "getProvider\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getProvider](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getProvider()) + pub fn getProvider<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getProvider", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", + "getProvider\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getSubclass](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getSubclass()) - pub fn getSubclass<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getSubclass", .descriptor == "()B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", "getSubclass\0", "()B\0"); - __jni_env.call_byte_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getSubclass](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getSubclass()) + pub fn getSubclass<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getSubclass", .descriptor == "()B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", + "getSubclass\0", + "()B\0", + ); + __jni_env.call_byte_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDescriptors](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getDescriptors()) - pub fn getDescriptors<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getDescriptors", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", "getDescriptors\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDescriptors](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#getDescriptors()) + pub fn getDescriptors<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "getDescriptors", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", + "getDescriptors\0", + "()[B\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothHidDeviceAppSdpSettings.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothHidDeviceAppSdpSettings", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDeviceAppSdpSettings\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public class [BluetoothHidDevice.Callback](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html) - public class BluetoothHidDevice_Callback ("android/bluetooth/BluetoothHidDevice$Callback\0") extends super::super::java::lang::Object { + /// pub class [BluetoothHidDevice.Callback](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html) + #[repr(transparent)] + pub struct BluetoothHidDevice_Callback(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothHidDevice_Callback {} - /// [Callback](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#Callback()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice$Callback\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothHidDevice_Callback { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothHidDevice$Callback\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothHidDevice_Callback {} + impl ::std::ops::Deref for BluetoothHidDevice_Callback { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothHidDevice_Callback { + /// [Callback](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#Callback()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice$Callback\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [onAppStatusChanged](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onAppStatusChanged(android.bluetooth.BluetoothDevice,%20boolean)) - pub fn onAppStatusChanged<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: bool) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onAppStatusChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Z)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice$Callback\0", "onAppStatusChanged\0", "(Landroid/bluetooth/BluetoothDevice;Z)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onAppStatusChanged](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onAppStatusChanged(android.bluetooth.BluetoothDevice,%20boolean)) + pub fn onAppStatusChanged<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: bool, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onAppStatusChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;Z)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice$Callback\0", + "onAppStatusChanged\0", + "(Landroid/bluetooth/BluetoothDevice;Z)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onConnectionStateChanged](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onConnectionStateChanged(android.bluetooth.BluetoothDevice,%20int)) - pub fn onConnectionStateChanged<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onConnectionStateChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice$Callback\0", "onConnectionStateChanged\0", "(Landroid/bluetooth/BluetoothDevice;I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onConnectionStateChanged](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onConnectionStateChanged(android.bluetooth.BluetoothDevice,%20int)) + pub fn onConnectionStateChanged<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onConnectionStateChanged", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice$Callback\0", + "onConnectionStateChanged\0", + "(Landroid/bluetooth/BluetoothDevice;I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onGetReport](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onGetReport(android.bluetooth.BluetoothDevice,%20byte,%20byte,%20int)) - pub fn onGetReport<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i8, arg2: i8, arg3: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onGetReport", .descriptor == "(Landroid/bluetooth/BluetoothDevice;BBI)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice$Callback\0", "onGetReport\0", "(Landroid/bluetooth/BluetoothDevice;BBI)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onGetReport](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onGetReport(android.bluetooth.BluetoothDevice,%20byte,%20byte,%20int)) + pub fn onGetReport<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i8, + arg2: i8, + arg3: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onGetReport", .descriptor == "(Landroid/bluetooth/BluetoothDevice;BBI)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice$Callback\0", + "onGetReport\0", + "(Landroid/bluetooth/BluetoothDevice;BBI)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onSetReport](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onSetReport(android.bluetooth.BluetoothDevice,%20byte,%20byte,%20byte%5B%5D)) - pub fn onSetReport<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i8, arg2: i8, arg3: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onSetReport", .descriptor == "(Landroid/bluetooth/BluetoothDevice;BB[B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice$Callback\0", "onSetReport\0", "(Landroid/bluetooth/BluetoothDevice;BB[B)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onSetReport](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onSetReport(android.bluetooth.BluetoothDevice,%20byte,%20byte,%20byte%5B%5D)) + pub fn onSetReport<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i8, + arg2: i8, + arg3: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onSetReport", .descriptor == "(Landroid/bluetooth/BluetoothDevice;BB[B)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + arg3.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice$Callback\0", + "onSetReport\0", + "(Landroid/bluetooth/BluetoothDevice;BB[B)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onSetProtocol](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onSetProtocol(android.bluetooth.BluetoothDevice,%20byte)) - pub fn onSetProtocol<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i8) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onSetProtocol", .descriptor == "(Landroid/bluetooth/BluetoothDevice;B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice$Callback\0", "onSetProtocol\0", "(Landroid/bluetooth/BluetoothDevice;B)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onSetProtocol](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onSetProtocol(android.bluetooth.BluetoothDevice,%20byte)) + pub fn onSetProtocol<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i8, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onSetProtocol", .descriptor == "(Landroid/bluetooth/BluetoothDevice;B)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice$Callback\0", + "onSetProtocol\0", + "(Landroid/bluetooth/BluetoothDevice;B)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onInterruptData](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onInterruptData(android.bluetooth.BluetoothDevice,%20byte,%20byte%5B%5D)) - pub fn onInterruptData<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i8, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onInterruptData", .descriptor == "(Landroid/bluetooth/BluetoothDevice;B[B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice$Callback\0", "onInterruptData\0", "(Landroid/bluetooth/BluetoothDevice;B[B)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onInterruptData](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onInterruptData(android.bluetooth.BluetoothDevice,%20byte,%20byte%5B%5D)) + pub fn onInterruptData<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i8, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onInterruptData", .descriptor == "(Landroid/bluetooth/BluetoothDevice;B[B)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + arg2.as_arg_jvalue(), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice$Callback\0", + "onInterruptData\0", + "(Landroid/bluetooth/BluetoothDevice;B[B)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onVirtualCableUnplug](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onVirtualCableUnplug(android.bluetooth.BluetoothDevice)) - pub fn onVirtualCableUnplug<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onVirtualCableUnplug", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothHidDevice$Callback\0", "onVirtualCableUnplug\0", "(Landroid/bluetooth/BluetoothDevice;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onVirtualCableUnplug](https://developer.android.com/reference/android/bluetooth/BluetoothHidDevice.Callback.html#onVirtualCableUnplug(android.bluetooth.BluetoothDevice)) + pub fn onVirtualCableUnplug<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothHidDevice$Callback", java.flags == PUBLIC, .name == "onVirtualCableUnplug", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothHidDevice$Callback\0", + "onVirtualCableUnplug\0", + "(Landroid/bluetooth/BluetoothDevice;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [BluetoothLeAudio](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html) - public final class BluetoothLeAudio ("android/bluetooth/BluetoothLeAudio\0") extends super::super::java::lang::Object, implements BluetoothProfile { + /// pub final class [BluetoothLeAudio](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html) + #[repr(transparent)] + pub struct BluetoothLeAudio(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothLeAudio {} - /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#close()) - pub fn close<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "close", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudio\0", "close\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothLeAudio { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothLeAudio\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothLeAudio {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothLeAudio {} + impl ::std::ops::Deref for BluetoothLeAudio { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothLeAudio { + fn as_ref(&self) -> &BluetoothProfile { + unsafe { &*(self as *const Self as *const BluetoothProfile) } + } + } + impl BluetoothLeAudio { + /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#close()) + pub fn close<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "close", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothLeAudio\0", "close\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectedGroupLeadDevice](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getConnectedGroupLeadDevice(int)) - pub fn getConnectedGroupLeadDevice<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getConnectedGroupLeadDevice", .descriptor == "(I)Landroid/bluetooth/BluetoothDevice;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudio\0", "getConnectedGroupLeadDevice\0", "(I)Landroid/bluetooth/BluetoothDevice;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectedGroupLeadDevice](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getConnectedGroupLeadDevice(int)) + pub fn getConnectedGroupLeadDevice<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getConnectedGroupLeadDevice", .descriptor == "(I)Landroid/bluetooth/BluetoothDevice;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudio\0", + "getConnectedGroupLeadDevice\0", + "(I)Landroid/bluetooth/BluetoothDevice;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getConnectedDevices()) - pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudio\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getConnectedDevices()) + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudio\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getDevicesMatchingConnectionStates(int%5B%5D)) - pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudio\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getDevicesMatchingConnectionStates(int%5B%5D)) + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudio\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getConnectionState(android.bluetooth.BluetoothDevice)) - pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudio\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getConnectionState(android.bluetooth.BluetoothDevice)) + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudio\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getGroupId](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getGroupId(android.bluetooth.BluetoothDevice)) - pub fn getGroupId<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getGroupId", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudio\0", "getGroupId\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getGroupId](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#getGroupId(android.bluetooth.BluetoothDevice)) + pub fn getGroupId<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudio", java.flags == PUBLIC, .name == "getGroupId", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudio\0", + "getGroupId\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED) - pub const ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED : &'static str = "android.bluetooth.action.LE_AUDIO_CONNECTION_STATE_CHANGED"; + /// public static final [ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED) + pub const ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED: &'static str = + "android.bluetooth.action.LE_AUDIO_CONNECTION_STATE_CHANGED"; - /// public static final [GROUP_ID_INVALID](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#GROUP_ID_INVALID) - pub const GROUP_ID_INVALID : i32 = -1; - } + /// public static final [GROUP_ID_INVALID](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio.html#GROUP_ID_INVALID) + pub const GROUP_ID_INVALID: i32 = -1; } - ::java_spaghetti::class! { - /// public final class [BluetoothLeAudioCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html) - public final class BluetoothLeAudioCodecConfig ("android/bluetooth/BluetoothLeAudioCodecConfig\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub final class [BluetoothLeAudioCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html) + #[repr(transparent)] + pub struct BluetoothLeAudioCodecConfig(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothLeAudioCodecConfig {} - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothLeAudioCodecConfig { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothLeAudioCodecConfig\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothLeAudioCodecConfig {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothLeAudioCodecConfig {} + impl ::std::ops::Deref for BluetoothLeAudioCodecConfig { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothLeAudioCodecConfig { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothLeAudioCodecConfig { + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecType](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getCodecType()) - pub fn getCodecType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getCodecType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getCodecType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecType](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getCodecType()) + pub fn getCodecType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getCodecType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getCodecType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecName](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getCodecName()) - pub fn getCodecName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getCodecName", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getCodecName\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecName](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getCodecName()) + pub fn getCodecName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getCodecName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getCodecName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCodecPriority](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getCodecPriority()) - pub fn getCodecPriority<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getCodecPriority", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getCodecPriority\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCodecPriority](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getCodecPriority()) + pub fn getCodecPriority<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getCodecPriority", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getCodecPriority\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getSampleRate](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getSampleRate()) - pub fn getSampleRate<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getSampleRate", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getSampleRate\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getSampleRate](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getSampleRate()) + pub fn getSampleRate<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getSampleRate", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getSampleRate\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getBitsPerSample](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getBitsPerSample()) - pub fn getBitsPerSample<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getBitsPerSample", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getBitsPerSample\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBitsPerSample](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getBitsPerSample()) + pub fn getBitsPerSample<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getBitsPerSample", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getBitsPerSample\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getChannelCount](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getChannelCount()) - pub fn getChannelCount<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getChannelCount", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getChannelCount\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getChannelCount](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getChannelCount()) + pub fn getChannelCount<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getChannelCount", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getChannelCount\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getFrameDuration](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getFrameDuration()) - pub fn getFrameDuration<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getFrameDuration", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getFrameDuration\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getFrameDuration](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getFrameDuration()) + pub fn getFrameDuration<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getFrameDuration", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getFrameDuration\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getOctetsPerFrame()) - pub fn getOctetsPerFrame<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getOctetsPerFrame", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getOctetsPerFrame\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getOctetsPerFrame()) + pub fn getOctetsPerFrame<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getOctetsPerFrame", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getOctetsPerFrame\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getMinOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getMinOctetsPerFrame()) - pub fn getMinOctetsPerFrame<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getMinOctetsPerFrame", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getMinOctetsPerFrame\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getMinOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getMinOctetsPerFrame()) + pub fn getMinOctetsPerFrame<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getMinOctetsPerFrame", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getMinOctetsPerFrame\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getMaxOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getMaxOctetsPerFrame()) - pub fn getMaxOctetsPerFrame<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getMaxOctetsPerFrame", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "getMaxOctetsPerFrame\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getMaxOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#getMaxOctetsPerFrame()) + pub fn getMaxOctetsPerFrame<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "getMaxOctetsPerFrame", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "getMaxOctetsPerFrame\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig\0", + "hashCode\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [BITS_PER_SAMPLE_16](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#BITS_PER_SAMPLE_16) - pub const BITS_PER_SAMPLE_16 : i32 = 1; + /// public static final [BITS_PER_SAMPLE_16](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#BITS_PER_SAMPLE_16) + pub const BITS_PER_SAMPLE_16: i32 = 1; - /// public static final [BITS_PER_SAMPLE_24](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#BITS_PER_SAMPLE_24) - pub const BITS_PER_SAMPLE_24 : i32 = 2; + /// public static final [BITS_PER_SAMPLE_24](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#BITS_PER_SAMPLE_24) + pub const BITS_PER_SAMPLE_24: i32 = 2; - /// public static final [BITS_PER_SAMPLE_32](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#BITS_PER_SAMPLE_32) - pub const BITS_PER_SAMPLE_32 : i32 = 8; + /// public static final [BITS_PER_SAMPLE_32](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#BITS_PER_SAMPLE_32) + pub const BITS_PER_SAMPLE_32: i32 = 8; - /// public static final [BITS_PER_SAMPLE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#BITS_PER_SAMPLE_NONE) - pub const BITS_PER_SAMPLE_NONE : i32 = 0; + /// public static final [BITS_PER_SAMPLE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#BITS_PER_SAMPLE_NONE) + pub const BITS_PER_SAMPLE_NONE: i32 = 0; - /// public static final [CHANNEL_COUNT_1](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CHANNEL_COUNT_1) - pub const CHANNEL_COUNT_1 : i32 = 1; + /// public static final [CHANNEL_COUNT_1](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CHANNEL_COUNT_1) + pub const CHANNEL_COUNT_1: i32 = 1; - /// public static final [CHANNEL_COUNT_2](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CHANNEL_COUNT_2) - pub const CHANNEL_COUNT_2 : i32 = 2; + /// public static final [CHANNEL_COUNT_2](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CHANNEL_COUNT_2) + pub const CHANNEL_COUNT_2: i32 = 2; - /// public static final [CHANNEL_COUNT_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CHANNEL_COUNT_NONE) - pub const CHANNEL_COUNT_NONE : i32 = 0; + /// public static final [CHANNEL_COUNT_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CHANNEL_COUNT_NONE) + pub const CHANNEL_COUNT_NONE: i32 = 0; - /// public static final [CODEC_PRIORITY_DEFAULT](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CODEC_PRIORITY_DEFAULT) - pub const CODEC_PRIORITY_DEFAULT : i32 = 0; + /// public static final [CODEC_PRIORITY_DEFAULT](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CODEC_PRIORITY_DEFAULT) + pub const CODEC_PRIORITY_DEFAULT: i32 = 0; - /// public static final [CODEC_PRIORITY_DISABLED](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CODEC_PRIORITY_DISABLED) - pub const CODEC_PRIORITY_DISABLED : i32 = -1; + /// public static final [CODEC_PRIORITY_DISABLED](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CODEC_PRIORITY_DISABLED) + pub const CODEC_PRIORITY_DISABLED: i32 = -1; - /// public static final [CODEC_PRIORITY_HIGHEST](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CODEC_PRIORITY_HIGHEST) - pub const CODEC_PRIORITY_HIGHEST : i32 = 1000000; + /// public static final [CODEC_PRIORITY_HIGHEST](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#CODEC_PRIORITY_HIGHEST) + pub const CODEC_PRIORITY_HIGHEST: i32 = 1000000; - /// public static final [FRAME_DURATION_10000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#FRAME_DURATION_10000) - pub const FRAME_DURATION_10000 : i32 = 2; + /// public static final [FRAME_DURATION_10000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#FRAME_DURATION_10000) + pub const FRAME_DURATION_10000: i32 = 2; - /// public static final [FRAME_DURATION_7500](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#FRAME_DURATION_7500) - pub const FRAME_DURATION_7500 : i32 = 1; + /// public static final [FRAME_DURATION_7500](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#FRAME_DURATION_7500) + pub const FRAME_DURATION_7500: i32 = 1; - /// public static final [FRAME_DURATION_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#FRAME_DURATION_NONE) - pub const FRAME_DURATION_NONE : i32 = 0; + /// public static final [FRAME_DURATION_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#FRAME_DURATION_NONE) + pub const FRAME_DURATION_NONE: i32 = 0; - /// public static final [SAMPLE_RATE_16000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_16000) - pub const SAMPLE_RATE_16000 : i32 = 4; + /// public static final [SAMPLE_RATE_16000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_16000) + pub const SAMPLE_RATE_16000: i32 = 4; - /// public static final [SAMPLE_RATE_24000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_24000) - pub const SAMPLE_RATE_24000 : i32 = 16; + /// public static final [SAMPLE_RATE_24000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_24000) + pub const SAMPLE_RATE_24000: i32 = 16; - /// public static final [SAMPLE_RATE_32000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_32000) - pub const SAMPLE_RATE_32000 : i32 = 32; + /// public static final [SAMPLE_RATE_32000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_32000) + pub const SAMPLE_RATE_32000: i32 = 32; - /// public static final [SAMPLE_RATE_44100](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_44100) - pub const SAMPLE_RATE_44100 : i32 = 64; + /// public static final [SAMPLE_RATE_44100](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_44100) + pub const SAMPLE_RATE_44100: i32 = 64; - /// public static final [SAMPLE_RATE_48000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_48000) - pub const SAMPLE_RATE_48000 : i32 = 128; + /// public static final [SAMPLE_RATE_48000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_48000) + pub const SAMPLE_RATE_48000: i32 = 128; - /// public static final [SAMPLE_RATE_8000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_8000) - pub const SAMPLE_RATE_8000 : i32 = 1; + /// public static final [SAMPLE_RATE_8000](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_8000) + pub const SAMPLE_RATE_8000: i32 = 1; - /// public static final [SAMPLE_RATE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_NONE) - pub const SAMPLE_RATE_NONE : i32 = 0; + /// public static final [SAMPLE_RATE_NONE](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SAMPLE_RATE_NONE) + pub const SAMPLE_RATE_NONE: i32 = 0; - /// public static final [SOURCE_CODEC_TYPE_INVALID](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SOURCE_CODEC_TYPE_INVALID) - pub const SOURCE_CODEC_TYPE_INVALID : i32 = 1000000; + /// public static final [SOURCE_CODEC_TYPE_INVALID](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SOURCE_CODEC_TYPE_INVALID) + pub const SOURCE_CODEC_TYPE_INVALID: i32 = 1000000; - /// public static final [SOURCE_CODEC_TYPE_LC3](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SOURCE_CODEC_TYPE_LC3) - pub const SOURCE_CODEC_TYPE_LC3 : i32 = 0; - } + /// public static final [SOURCE_CODEC_TYPE_LC3](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.html#SOURCE_CODEC_TYPE_LC3) + pub const SOURCE_CODEC_TYPE_LC3: i32 = 0; } - ::java_spaghetti::class! { - /// public final class [BluetoothLeAudioCodecConfig.Builder](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html) - public final class BluetoothLeAudioCodecConfig_Builder ("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0") extends super::super::java::lang::Object { + /// pub final class [BluetoothLeAudioCodecConfig.Builder](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html) + #[repr(transparent)] + pub struct BluetoothLeAudioCodecConfig_Builder(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothLeAudioCodecConfig_Builder {} - /// [Builder](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#Builder()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothLeAudioCodecConfig_Builder { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothLeAudioCodecConfig_Builder {} + impl ::std::ops::Deref for BluetoothLeAudioCodecConfig_Builder { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothLeAudioCodecConfig_Builder { + /// [Builder](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#Builder()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "\0", + "()V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [Builder](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#Builder(android.bluetooth.BluetoothLeAudioCodecConfig)) - pub fn new_BluetoothLeAudioCodecConfig<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothLeAudioCodecConfig>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "", .descriptor == "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "\0", "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [Builder](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#Builder(android.bluetooth.BluetoothLeAudioCodecConfig)) + pub fn new_BluetoothLeAudioCodecConfig<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "", .descriptor == "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "\0", + "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecType](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setCodecType(int)) - pub fn setCodecType<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecType", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "setCodecType\0", "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecType](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setCodecType(int)) + pub fn setCodecType<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecType", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "setCodecType\0", + "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setCodecPriority](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setCodecPriority(int)) - pub fn setCodecPriority<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecPriority", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "setCodecPriority\0", "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setCodecPriority](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setCodecPriority(int)) + pub fn setCodecPriority<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setCodecPriority", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "setCodecPriority\0", + "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setSampleRate](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setSampleRate(int)) - pub fn setSampleRate<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setSampleRate", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "setSampleRate\0", "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setSampleRate](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setSampleRate(int)) + pub fn setSampleRate<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setSampleRate", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "setSampleRate\0", + "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setBitsPerSample](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setBitsPerSample(int)) - pub fn setBitsPerSample<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setBitsPerSample", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "setBitsPerSample\0", "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setBitsPerSample](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setBitsPerSample(int)) + pub fn setBitsPerSample<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setBitsPerSample", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "setBitsPerSample\0", + "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setChannelCount](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setChannelCount(int)) - pub fn setChannelCount<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setChannelCount", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "setChannelCount\0", "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setChannelCount](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setChannelCount(int)) + pub fn setChannelCount<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setChannelCount", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "setChannelCount\0", + "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setFrameDuration](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setFrameDuration(int)) - pub fn setFrameDuration<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setFrameDuration", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "setFrameDuration\0", "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setFrameDuration](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setFrameDuration(int)) + pub fn setFrameDuration<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setFrameDuration", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "setFrameDuration\0", + "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setOctetsPerFrame(int)) - pub fn setOctetsPerFrame<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setOctetsPerFrame", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "setOctetsPerFrame\0", "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setOctetsPerFrame(int)) + pub fn setOctetsPerFrame<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setOctetsPerFrame", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "setOctetsPerFrame\0", + "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setMinOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setMinOctetsPerFrame(int)) - pub fn setMinOctetsPerFrame<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setMinOctetsPerFrame", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "setMinOctetsPerFrame\0", "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setMinOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setMinOctetsPerFrame(int)) + pub fn setMinOctetsPerFrame<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setMinOctetsPerFrame", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "setMinOctetsPerFrame\0", + "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setMaxOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setMaxOctetsPerFrame(int)) - pub fn setMaxOctetsPerFrame<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setMaxOctetsPerFrame", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "setMaxOctetsPerFrame\0", "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setMaxOctetsPerFrame](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#setMaxOctetsPerFrame(int)) + pub fn setMaxOctetsPerFrame<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig_Builder>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "setMaxOctetsPerFrame", .descriptor == "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "setMaxOctetsPerFrame\0", + "(I)Landroid/bluetooth/BluetoothLeAudioCodecConfig$Builder;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [build](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#build()) - pub fn build<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", "build\0", "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [build](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecConfig.Builder.html#build()) + pub fn build<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecConfig$Builder", java.flags == PUBLIC, .name == "build", .descriptor == "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecConfig$Builder\0", + "build\0", + "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [BluetoothLeAudioCodecStatus](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html) - public final class BluetoothLeAudioCodecStatus ("android/bluetooth/BluetoothLeAudioCodecStatus\0") extends super::super::java::lang::Object, implements super::os::Parcelable { + /// pub final class [BluetoothLeAudioCodecStatus](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html) + #[repr(transparent)] + pub struct BluetoothLeAudioCodecStatus(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothLeAudioCodecStatus {} - /// [BluetoothLeAudioCodecStatus](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#BluetoothLeAudioCodecStatus(android.bluetooth.BluetoothLeAudioCodecConfig,%20android.bluetooth.BluetoothLeAudioCodecConfig,%20java.util.List,%20java.util.List,%20java.util.List,%20java.util.List)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothLeAudioCodecConfig>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothLeAudioCodecConfig>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::List>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::List>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::List>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::List>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "", .descriptor == "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;Landroid/bluetooth/BluetoothLeAudioCodecConfig;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "\0", "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;Landroid/bluetooth/BluetoothLeAudioCodecConfig;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothLeAudioCodecStatus { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothLeAudioCodecStatus\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothLeAudioCodecStatus {} + unsafe impl ::java_spaghetti::AssignableTo for BluetoothLeAudioCodecStatus {} + impl ::std::ops::Deref for BluetoothLeAudioCodecStatus { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for BluetoothLeAudioCodecStatus { + fn as_ref(&self) -> &super::os::Parcelable { + unsafe { &*(self as *const Self as *const super::os::Parcelable) } + } + } + impl BluetoothLeAudioCodecStatus { + /// [BluetoothLeAudioCodecStatus](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#BluetoothLeAudioCodecStatus(android.bluetooth.BluetoothLeAudioCodecConfig,%20android.bluetooth.BluetoothLeAudioCodecConfig,%20java.util.List,%20java.util.List,%20java.util.List,%20java.util.List)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "", .descriptor == "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;Landroid/bluetooth/BluetoothLeAudioCodecConfig;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "\0", "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;Landroid/bluetooth/BluetoothLeAudioCodecConfig;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isInputCodecConfigSelectable](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#isInputCodecConfigSelectable(android.bluetooth.BluetoothLeAudioCodecConfig)) - pub fn isInputCodecConfigSelectable<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothLeAudioCodecConfig>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "isInputCodecConfigSelectable", .descriptor == "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "isInputCodecConfigSelectable\0", "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isInputCodecConfigSelectable](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#isInputCodecConfigSelectable(android.bluetooth.BluetoothLeAudioCodecConfig)) + pub fn isInputCodecConfigSelectable<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "isInputCodecConfigSelectable", .descriptor == "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "isInputCodecConfigSelectable\0", + "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isOutputCodecConfigSelectable](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#isOutputCodecConfigSelectable(android.bluetooth.BluetoothLeAudioCodecConfig)) - pub fn isOutputCodecConfigSelectable<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothLeAudioCodecConfig>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "isOutputCodecConfigSelectable", .descriptor == "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "isOutputCodecConfigSelectable\0", "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isOutputCodecConfigSelectable](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#isOutputCodecConfigSelectable(android.bluetooth.BluetoothLeAudioCodecConfig)) + pub fn isOutputCodecConfigSelectable<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "isOutputCodecConfigSelectable", .descriptor == "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "isOutputCodecConfigSelectable\0", + "(Landroid/bluetooth/BluetoothLeAudioCodecConfig;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "hashCode\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "describeContents\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getInputCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getInputCodecConfig()) - pub fn getInputCodecConfig<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getInputCodecConfig", .descriptor == "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "getInputCodecConfig\0", "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getInputCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getInputCodecConfig()) + pub fn getInputCodecConfig<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getInputCodecConfig", .descriptor == "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "getInputCodecConfig\0", + "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getOutputCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getOutputCodecConfig()) - pub fn getOutputCodecConfig<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getOutputCodecConfig", .descriptor == "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "getOutputCodecConfig\0", "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getOutputCodecConfig](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getOutputCodecConfig()) + pub fn getOutputCodecConfig<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothLeAudioCodecConfig>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getOutputCodecConfig", .descriptor == "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "getOutputCodecConfig\0", + "()Landroid/bluetooth/BluetoothLeAudioCodecConfig;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getInputCodecLocalCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getInputCodecLocalCapabilities()) - pub fn getInputCodecLocalCapabilities<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getInputCodecLocalCapabilities", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "getInputCodecLocalCapabilities\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getInputCodecLocalCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getInputCodecLocalCapabilities()) + pub fn getInputCodecLocalCapabilities<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getInputCodecLocalCapabilities", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "getInputCodecLocalCapabilities\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getOutputCodecLocalCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getOutputCodecLocalCapabilities()) - pub fn getOutputCodecLocalCapabilities<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getOutputCodecLocalCapabilities", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "getOutputCodecLocalCapabilities\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getOutputCodecLocalCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getOutputCodecLocalCapabilities()) + pub fn getOutputCodecLocalCapabilities<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getOutputCodecLocalCapabilities", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "getOutputCodecLocalCapabilities\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getInputCodecSelectableCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getInputCodecSelectableCapabilities()) - pub fn getInputCodecSelectableCapabilities<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getInputCodecSelectableCapabilities", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "getInputCodecSelectableCapabilities\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getInputCodecSelectableCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getInputCodecSelectableCapabilities()) + pub fn getInputCodecSelectableCapabilities<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getInputCodecSelectableCapabilities", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "getInputCodecSelectableCapabilities\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getOutputCodecSelectableCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getOutputCodecSelectableCapabilities()) - pub fn getOutputCodecSelectableCapabilities<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getOutputCodecSelectableCapabilities", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothLeAudioCodecStatus\0", "getOutputCodecSelectableCapabilities\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getOutputCodecSelectableCapabilities](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#getOutputCodecSelectableCapabilities()) + pub fn getOutputCodecSelectableCapabilities<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothLeAudioCodecStatus", java.flags == PUBLIC, .name == "getOutputCodecSelectableCapabilities", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothLeAudioCodecStatus\0", + "getOutputCodecSelectableCapabilities\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } - - /// public static final [EXTRA_LE_AUDIO_CODEC_STATUS](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#EXTRA_LE_AUDIO_CODEC_STATUS) - pub const EXTRA_LE_AUDIO_CODEC_STATUS : &'static str = "android.bluetooth.extra.LE_AUDIO_CODEC_STATUS"; } + + /// public static final [EXTRA_LE_AUDIO_CODEC_STATUS](https://developer.android.com/reference/android/bluetooth/BluetoothLeAudioCodecStatus.html#EXTRA_LE_AUDIO_CODEC_STATUS) + pub const EXTRA_LE_AUDIO_CODEC_STATUS: &'static str = "android.bluetooth.extra.LE_AUDIO_CODEC_STATUS"; } - ::java_spaghetti::class! { - /// public final class [BluetoothManager](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html) - public final class BluetoothManager ("android/bluetooth/BluetoothManager\0") extends super::super::java::lang::Object { + /// pub final class [BluetoothManager](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html) + #[repr(transparent)] + pub struct BluetoothManager(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothManager {} - /// [getAdapter](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html#getAdapter()) - pub fn getAdapter<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothAdapter>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothManager", java.flags == PUBLIC, .name == "getAdapter", .descriptor == "()Landroid/bluetooth/BluetoothAdapter;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothManager\0", "getAdapter\0", "()Landroid/bluetooth/BluetoothAdapter;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothManager { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothManager\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothManager {} + impl ::std::ops::Deref for BluetoothManager { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothManager { + /// [getAdapter](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html#getAdapter()) + pub fn getAdapter<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothAdapter>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothManager", java.flags == PUBLIC, .name == "getAdapter", .descriptor == "()Landroid/bluetooth/BluetoothAdapter;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothManager\0", + "getAdapter\0", + "()Landroid/bluetooth/BluetoothAdapter;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html#getConnectionState(android.bluetooth.BluetoothDevice,%20int)) - pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>, arg1: i32) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothManager", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothManager\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html#getConnectionState(android.bluetooth.BluetoothDevice,%20int)) + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothManager", java.flags == PUBLIC, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;I)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothManager\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;I)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html#getConnectedDevices(int)) - pub fn getConnectedDevices<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothManager", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "(I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothManager\0", "getConnectedDevices\0", "(I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html#getConnectedDevices(int)) + pub fn getConnectedDevices<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothManager", java.flags == PUBLIC, .name == "getConnectedDevices", .descriptor == "(I)Ljava/util/List;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothManager\0", + "getConnectedDevices\0", + "(I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html#getDevicesMatchingConnectionStates(int,%20int%5B%5D)) - pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothManager", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "(I[I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothManager\0", "getDevicesMatchingConnectionStates\0", "(I[I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothManager.html#getDevicesMatchingConnectionStates(int,%20int%5B%5D)) + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothManager", java.flags == PUBLIC, .name == "getDevicesMatchingConnectionStates", .descriptor == "(I[I)Ljava/util/List;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothManager\0", + "getDevicesMatchingConnectionStates\0", + "(I[I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public interface [BluetoothProfile](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html) - public interface BluetoothProfile ("android/bluetooth/BluetoothProfile\0") extends super::super::java::lang::Object { + /// pub interface [BluetoothProfile](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html) + #[repr(transparent)] + pub struct BluetoothProfile(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothProfile {} - /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#getConnectedDevices()) - pub fn getConnectedDevices<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothProfile", java.flags == PUBLIC | ABSTRACT, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothProfile\0", "getConnectedDevices\0", "()Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothProfile { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothProfile\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothProfile {} + impl ::std::ops::Deref for BluetoothProfile { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothProfile { + /// [getConnectedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#getConnectedDevices()) + pub fn getConnectedDevices<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothProfile", java.flags == PUBLIC | ABSTRACT, .name == "getConnectedDevices", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothProfile\0", + "getConnectedDevices\0", + "()Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#getDevicesMatchingConnectionStates(int%5B%5D)) - pub fn getDevicesMatchingConnectionStates<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothProfile", java.flags == PUBLIC | ABSTRACT, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothProfile\0", "getDevicesMatchingConnectionStates\0", "([I)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getDevicesMatchingConnectionStates](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#getDevicesMatchingConnectionStates(int%5B%5D)) + pub fn getDevicesMatchingConnectionStates<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::List>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothProfile", java.flags == PUBLIC | ABSTRACT, .name == "getDevicesMatchingConnectionStates", .descriptor == "([I)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothProfile\0", + "getDevicesMatchingConnectionStates\0", + "([I)Ljava/util/List;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#getConnectionState(android.bluetooth.BluetoothDevice)) - pub fn getConnectionState<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env BluetoothDevice>>) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothProfile", java.flags == PUBLIC | ABSTRACT, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothProfile\0", "getConnectionState\0", "(Landroid/bluetooth/BluetoothDevice;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionState](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#getConnectionState(android.bluetooth.BluetoothDevice)) + pub fn getConnectionState<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothProfile", java.flags == PUBLIC | ABSTRACT, .name == "getConnectionState", .descriptor == "(Landroid/bluetooth/BluetoothDevice;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothProfile\0", + "getConnectionState\0", + "(Landroid/bluetooth/BluetoothDevice;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [A2DP](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#A2DP) - pub const A2DP : i32 = 2; + /// public static final [A2DP](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#A2DP) + pub const A2DP: i32 = 2; - /// public static final [CSIP_SET_COORDINATOR](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#CSIP_SET_COORDINATOR) - pub const CSIP_SET_COORDINATOR : i32 = 25; + /// public static final [CSIP_SET_COORDINATOR](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#CSIP_SET_COORDINATOR) + pub const CSIP_SET_COORDINATOR: i32 = 25; - /// public static final [EXTRA_PREVIOUS_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#EXTRA_PREVIOUS_STATE) - pub const EXTRA_PREVIOUS_STATE : &'static str = "android.bluetooth.profile.extra.PREVIOUS_STATE"; + /// public static final [EXTRA_PREVIOUS_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#EXTRA_PREVIOUS_STATE) + pub const EXTRA_PREVIOUS_STATE: &'static str = "android.bluetooth.profile.extra.PREVIOUS_STATE"; - /// public static final [EXTRA_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#EXTRA_STATE) - pub const EXTRA_STATE : &'static str = "android.bluetooth.profile.extra.STATE"; + /// public static final [EXTRA_STATE](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#EXTRA_STATE) + pub const EXTRA_STATE: &'static str = "android.bluetooth.profile.extra.STATE"; - /// public static final [GATT](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#GATT) - pub const GATT : i32 = 7; + /// public static final [GATT](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#GATT) + pub const GATT: i32 = 7; - /// public static final [GATT_SERVER](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#GATT_SERVER) - pub const GATT_SERVER : i32 = 8; + /// public static final [GATT_SERVER](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#GATT_SERVER) + pub const GATT_SERVER: i32 = 8; - /// public static final [HAP_CLIENT](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HAP_CLIENT) - pub const HAP_CLIENT : i32 = 28; + /// public static final [HAP_CLIENT](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HAP_CLIENT) + pub const HAP_CLIENT: i32 = 28; - /// public static final [HEADSET](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HEADSET) - pub const HEADSET : i32 = 1; + /// public static final [HEADSET](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HEADSET) + pub const HEADSET: i32 = 1; - /// public static final [HEALTH](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HEALTH) - #[deprecated] pub const HEALTH : i32 = 3; + /// public static final [HEALTH](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HEALTH) + #[deprecated] + pub const HEALTH: i32 = 3; - /// public static final [HEARING_AID](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HEARING_AID) - pub const HEARING_AID : i32 = 21; + /// public static final [HEARING_AID](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HEARING_AID) + pub const HEARING_AID: i32 = 21; - /// public static final [HID_DEVICE](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HID_DEVICE) - pub const HID_DEVICE : i32 = 19; + /// public static final [HID_DEVICE](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#HID_DEVICE) + pub const HID_DEVICE: i32 = 19; - /// public static final [LE_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#LE_AUDIO) - pub const LE_AUDIO : i32 = 22; + /// public static final [LE_AUDIO](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#LE_AUDIO) + pub const LE_AUDIO: i32 = 22; - /// public static final [SAP](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#SAP) - pub const SAP : i32 = 10; + /// public static final [SAP](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#SAP) + pub const SAP: i32 = 10; - /// public static final [STATE_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_CONNECTED) - pub const STATE_CONNECTED : i32 = 2; + /// public static final [STATE_CONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_CONNECTED) + pub const STATE_CONNECTED: i32 = 2; - /// public static final [STATE_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_CONNECTING) - pub const STATE_CONNECTING : i32 = 1; + /// public static final [STATE_CONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_CONNECTING) + pub const STATE_CONNECTING: i32 = 1; - /// public static final [STATE_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_DISCONNECTED) - pub const STATE_DISCONNECTED : i32 = 0; + /// public static final [STATE_DISCONNECTED](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_DISCONNECTED) + pub const STATE_DISCONNECTED: i32 = 0; - /// public static final [STATE_DISCONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_DISCONNECTING) - pub const STATE_DISCONNECTING : i32 = 3; - } + /// public static final [STATE_DISCONNECTING](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_DISCONNECTING) + pub const STATE_DISCONNECTING: i32 = 3; } - ::java_spaghetti::class! { - /// public interface [BluetoothProfile.ServiceListener](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.ServiceListener.html) - public interface BluetoothProfile_ServiceListener ("android/bluetooth/BluetoothProfile$ServiceListener\0") extends super::super::java::lang::Object { + /// pub interface [BluetoothProfile.ServiceListener](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.ServiceListener.html) + #[repr(transparent)] + pub struct BluetoothProfile_ServiceListener(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothProfile_ServiceListener {} - /// [onServiceConnected](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.ServiceListener.html#onServiceConnected(int,%20android.bluetooth.BluetoothProfile)) - pub fn onServiceConnected<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env BluetoothProfile>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothProfile$ServiceListener", java.flags == PUBLIC | ABSTRACT, .name == "onServiceConnected", .descriptor == "(ILandroid/bluetooth/BluetoothProfile;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothProfile$ServiceListener\0", "onServiceConnected\0", "(ILandroid/bluetooth/BluetoothProfile;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothProfile_ServiceListener { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothProfile$ServiceListener\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothProfile_ServiceListener {} + impl ::std::ops::Deref for BluetoothProfile_ServiceListener { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothProfile_ServiceListener { + /// [onServiceConnected](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.ServiceListener.html#onServiceConnected(int,%20android.bluetooth.BluetoothProfile)) + pub fn onServiceConnected<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothProfile$ServiceListener", java.flags == PUBLIC | ABSTRACT, .name == "onServiceConnected", .descriptor == "(ILandroid/bluetooth/BluetoothProfile;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothProfile$ServiceListener\0", + "onServiceConnected\0", + "(ILandroid/bluetooth/BluetoothProfile;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onServiceDisconnected](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.ServiceListener.html#onServiceDisconnected(int)) - pub fn onServiceDisconnected<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothProfile$ServiceListener", java.flags == PUBLIC | ABSTRACT, .name == "onServiceDisconnected", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothProfile$ServiceListener\0", "onServiceDisconnected\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onServiceDisconnected](https://developer.android.com/reference/android/bluetooth/BluetoothProfile.ServiceListener.html#onServiceDisconnected(int)) + pub fn onServiceDisconnected<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothProfile$ServiceListener", java.flags == PUBLIC | ABSTRACT, .name == "onServiceDisconnected", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothProfile$ServiceListener\0", + "onServiceDisconnected\0", + "(I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [BluetoothServerSocket](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html) - public final class BluetoothServerSocket ("android/bluetooth/BluetoothServerSocket\0") extends super::super::java::lang::Object { + /// pub final class [BluetoothServerSocket](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html) + #[repr(transparent)] + pub struct BluetoothServerSocket(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothServerSocket {} - /// [accept](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#accept()) - pub fn accept<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "accept", .descriptor == "()Landroid/bluetooth/BluetoothSocket;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothServerSocket\0", "accept\0", "()Landroid/bluetooth/BluetoothSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothServerSocket { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothServerSocket\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothServerSocket {} + impl ::std::ops::Deref for BluetoothServerSocket { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothServerSocket { + /// [accept](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#accept()) + pub fn accept<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "accept", .descriptor == "()Landroid/bluetooth/BluetoothSocket;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothServerSocket\0", + "accept\0", + "()Landroid/bluetooth/BluetoothSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [accept](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#accept(int)) - pub fn accept_int<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "accept", .descriptor == "(I)Landroid/bluetooth/BluetoothSocket;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothServerSocket\0", "accept\0", "(I)Landroid/bluetooth/BluetoothSocket;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [accept](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#accept(int)) + pub fn accept_int<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothSocket>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "accept", .descriptor == "(I)Landroid/bluetooth/BluetoothSocket;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothServerSocket\0", + "accept\0", + "(I)Landroid/bluetooth/BluetoothSocket;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#close()) - pub fn close<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "close", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothServerSocket\0", "close\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#close()) + pub fn close<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "close", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothServerSocket\0", "close\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getPsm](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#getPsm()) - pub fn getPsm<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "getPsm", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothServerSocket\0", "getPsm\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getPsm](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#getPsm()) + pub fn getPsm<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "getPsm", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothServerSocket\0", + "getPsm\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothServerSocket\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothServerSocket", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothServerSocket\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [BluetoothSocket](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html) - public final class BluetoothSocket ("android/bluetooth/BluetoothSocket\0") extends super::super::java::lang::Object { + /// pub final class [BluetoothSocket](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html) + #[repr(transparent)] + pub struct BluetoothSocket(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothSocket {} - /// [getRemoteDevice](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getRemoteDevice()) - pub fn getRemoteDevice<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getRemoteDevice", .descriptor == "()Landroid/bluetooth/BluetoothDevice;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "getRemoteDevice\0", "()Landroid/bluetooth/BluetoothDevice;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for BluetoothSocket { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothSocket\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothSocket {} + impl ::std::ops::Deref for BluetoothSocket { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothSocket { + /// [getRemoteDevice](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getRemoteDevice()) + pub fn getRemoteDevice<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, BluetoothDevice>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getRemoteDevice", .descriptor == "()Landroid/bluetooth/BluetoothDevice;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothSocket\0", + "getRemoteDevice\0", + "()Landroid/bluetooth/BluetoothDevice;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getInputStream](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getInputStream()) - pub fn getInputStream<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::io::InputStream>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getInputStream", .descriptor == "()Ljava/io/InputStream;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "getInputStream\0", "()Ljava/io/InputStream;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getInputStream](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getInputStream()) + pub fn getInputStream<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::io::InputStream>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getInputStream", .descriptor == "()Ljava/io/InputStream;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothSocket\0", + "getInputStream\0", + "()Ljava/io/InputStream;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getOutputStream](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getOutputStream()) - pub fn getOutputStream<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::io::OutputStream>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getOutputStream", .descriptor == "()Ljava/io/OutputStream;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "getOutputStream\0", "()Ljava/io/OutputStream;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getOutputStream](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getOutputStream()) + pub fn getOutputStream<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::io::OutputStream>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getOutputStream", .descriptor == "()Ljava/io/OutputStream;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothSocket\0", + "getOutputStream\0", + "()Ljava/io/OutputStream;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isConnected](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#isConnected()) - pub fn isConnected<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "isConnected", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "isConnected\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isConnected](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#isConnected()) + pub fn isConnected<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "isConnected", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "isConnected\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [connect](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#connect()) - pub fn connect<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "connect", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "connect\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [connect](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#connect()) + pub fn connect<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "connect", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "connect\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#close()) - pub fn close<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "close", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "close\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [close](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#close()) + pub fn close<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "close", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "close\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getMaxTransmitPacketSize](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getMaxTransmitPacketSize()) - pub fn getMaxTransmitPacketSize<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getMaxTransmitPacketSize", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "getMaxTransmitPacketSize\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getMaxTransmitPacketSize](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getMaxTransmitPacketSize()) + pub fn getMaxTransmitPacketSize<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getMaxTransmitPacketSize", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothSocket\0", + "getMaxTransmitPacketSize\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getMaxReceivePacketSize](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getMaxReceivePacketSize()) - pub fn getMaxReceivePacketSize<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getMaxReceivePacketSize", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "getMaxReceivePacketSize\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getMaxReceivePacketSize](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getMaxReceivePacketSize()) + pub fn getMaxReceivePacketSize<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getMaxReceivePacketSize", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothSocket\0", + "getMaxReceivePacketSize\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getConnectionType](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getConnectionType()) - pub fn getConnectionType<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getConnectionType", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/bluetooth/BluetoothSocket\0", "getConnectionType\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getConnectionType](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getConnectionType()) + pub fn getConnectionType<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/bluetooth/BluetoothSocket", java.flags == PUBLIC, .name == "getConnectionType", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/bluetooth/BluetoothSocket\0", + "getConnectionType\0", + "()I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [TYPE_L2CAP](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#TYPE_L2CAP) - pub const TYPE_L2CAP : i32 = 3; + /// public static final [TYPE_L2CAP](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#TYPE_L2CAP) + pub const TYPE_L2CAP: i32 = 3; - /// public static final [TYPE_RFCOMM](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#TYPE_RFCOMM) - pub const TYPE_RFCOMM : i32 = 1; + /// public static final [TYPE_RFCOMM](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#TYPE_RFCOMM) + pub const TYPE_RFCOMM: i32 = 1; - /// public static final [TYPE_SCO](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#TYPE_SCO) - pub const TYPE_SCO : i32 = 2; - } + /// public static final [TYPE_SCO](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#TYPE_SCO) + pub const TYPE_SCO: i32 = 2; } - ::java_spaghetti::class! { - /// public final class [BluetoothStatusCodes](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html) - public final class BluetoothStatusCodes ("android/bluetooth/BluetoothStatusCodes\0") extends super::super::java::lang::Object { + /// pub final class [BluetoothStatusCodes](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html) + #[repr(transparent)] + pub struct BluetoothStatusCodes(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluetoothStatusCodes {} - /// public static final [ERROR_BLUETOOTH_NOT_ALLOWED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_BLUETOOTH_NOT_ALLOWED) - pub const ERROR_BLUETOOTH_NOT_ALLOWED : i32 = 2; + unsafe impl ::java_spaghetti::JniType for BluetoothStatusCodes { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/bluetooth/BluetoothStatusCodes\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for BluetoothStatusCodes {} + impl ::std::ops::Deref for BluetoothStatusCodes { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluetoothStatusCodes { + /// public static final [ERROR_BLUETOOTH_NOT_ALLOWED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_BLUETOOTH_NOT_ALLOWED) + pub const ERROR_BLUETOOTH_NOT_ALLOWED: i32 = 2; - /// public static final [ERROR_BLUETOOTH_NOT_ENABLED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_BLUETOOTH_NOT_ENABLED) - pub const ERROR_BLUETOOTH_NOT_ENABLED : i32 = 1; + /// public static final [ERROR_BLUETOOTH_NOT_ENABLED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_BLUETOOTH_NOT_ENABLED) + pub const ERROR_BLUETOOTH_NOT_ENABLED: i32 = 1; - /// public static final [ERROR_DEVICE_NOT_BONDED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_DEVICE_NOT_BONDED) - pub const ERROR_DEVICE_NOT_BONDED : i32 = 3; + /// public static final [ERROR_DEVICE_NOT_BONDED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_DEVICE_NOT_BONDED) + pub const ERROR_DEVICE_NOT_BONDED: i32 = 3; - /// public static final [ERROR_GATT_WRITE_NOT_ALLOWED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_GATT_WRITE_NOT_ALLOWED) - pub const ERROR_GATT_WRITE_NOT_ALLOWED : i32 = 200; + /// public static final [ERROR_GATT_WRITE_NOT_ALLOWED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_GATT_WRITE_NOT_ALLOWED) + pub const ERROR_GATT_WRITE_NOT_ALLOWED: i32 = 200; - /// public static final [ERROR_GATT_WRITE_REQUEST_BUSY](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_GATT_WRITE_REQUEST_BUSY) - pub const ERROR_GATT_WRITE_REQUEST_BUSY : i32 = 201; + /// public static final [ERROR_GATT_WRITE_REQUEST_BUSY](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_GATT_WRITE_REQUEST_BUSY) + pub const ERROR_GATT_WRITE_REQUEST_BUSY: i32 = 201; - /// public static final [ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION) - pub const ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION : i32 = 6; + /// public static final [ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION) + pub const ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION: i32 = 6; - /// public static final [ERROR_PROFILE_SERVICE_NOT_BOUND](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_PROFILE_SERVICE_NOT_BOUND) - pub const ERROR_PROFILE_SERVICE_NOT_BOUND : i32 = 9; + /// public static final [ERROR_PROFILE_SERVICE_NOT_BOUND](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_PROFILE_SERVICE_NOT_BOUND) + pub const ERROR_PROFILE_SERVICE_NOT_BOUND: i32 = 9; - /// public static final [ERROR_UNKNOWN](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_UNKNOWN) - pub const ERROR_UNKNOWN : i32 = 2147483647; + /// public static final [ERROR_UNKNOWN](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#ERROR_UNKNOWN) + pub const ERROR_UNKNOWN: i32 = 2147483647; - /// public static final [FEATURE_NOT_SUPPORTED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#FEATURE_NOT_SUPPORTED) - pub const FEATURE_NOT_SUPPORTED : i32 = 11; + /// public static final [FEATURE_NOT_SUPPORTED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#FEATURE_NOT_SUPPORTED) + pub const FEATURE_NOT_SUPPORTED: i32 = 11; - /// public static final [FEATURE_SUPPORTED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#FEATURE_SUPPORTED) - pub const FEATURE_SUPPORTED : i32 = 10; + /// public static final [FEATURE_SUPPORTED](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#FEATURE_SUPPORTED) + pub const FEATURE_SUPPORTED: i32 = 10; - /// public static final [SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#SUCCESS) - pub const SUCCESS : i32 = 0; - } + /// public static final [SUCCESS](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes.html#SUCCESS) + pub const SUCCESS: i32 = 0; } } pub mod os { - ::java_spaghetti::class! { - /// public final class [ParcelUuid](https://developer.android.com/reference/android/os/ParcelUuid.html) - public final class ParcelUuid ("android/os/ParcelUuid\0") extends super::super::java::lang::Object, implements Parcelable { + /// pub final class [ParcelUuid](https://developer.android.com/reference/android/os/ParcelUuid.html) + #[repr(transparent)] + pub struct ParcelUuid(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for ParcelUuid {} - /// [ParcelUuid](https://developer.android.com/reference/android/os/ParcelUuid.html#ParcelUuid(java.util.UUID)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::util::UUID>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/util/UUID;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/ParcelUuid\0", "\0", "(Ljava/util/UUID;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for ParcelUuid { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/os/ParcelUuid\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for ParcelUuid {} + unsafe impl ::java_spaghetti::AssignableTo for ParcelUuid {} + impl ::std::ops::Deref for ParcelUuid { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl ::std::convert::AsRef for ParcelUuid { + fn as_ref(&self) -> &Parcelable { + unsafe { &*(self as *const Self as *const Parcelable) } + } + } + impl ParcelUuid { + /// [ParcelUuid](https://developer.android.com/reference/android/os/ParcelUuid.html#ParcelUuid(java.util.UUID)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/util/UUID;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/os/ParcelUuid\0", "\0", "(Ljava/util/UUID;)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [fromString](https://developer.android.com/reference/android/os/ParcelUuid.html#fromString(java.lang.String)) - pub fn fromString<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ParcelUuid>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/os/ParcelUuid", java.flags == PUBLIC | STATIC, .name == "fromString", .descriptor == "(Ljava/lang/String;)Landroid/os/ParcelUuid;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/os/ParcelUuid\0", "fromString\0", "(Ljava/lang/String;)Landroid/os/ParcelUuid;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [fromString](https://developer.android.com/reference/android/os/ParcelUuid.html#fromString(java.lang.String)) + pub fn fromString<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ParcelUuid>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/os/ParcelUuid", java.flags == PUBLIC | STATIC, .name == "fromString", .descriptor == "(Ljava/lang/String;)Landroid/os/ParcelUuid;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "android/os/ParcelUuid\0", + "fromString\0", + "(Ljava/lang/String;)Landroid/os/ParcelUuid;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [getUuid](https://developer.android.com/reference/android/os/ParcelUuid.html#getUuid()) - pub fn getUuid<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::UUID>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "getUuid", .descriptor == "()Ljava/util/UUID;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/ParcelUuid\0", "getUuid\0", "()Ljava/util/UUID;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getUuid](https://developer.android.com/reference/android/os/ParcelUuid.html#getUuid()) + pub fn getUuid<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::util::UUID>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "getUuid", .descriptor == "()Ljava/util/UUID;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/os/ParcelUuid\0", "getUuid\0", "()Ljava/util/UUID;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/os/ParcelUuid.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/ParcelUuid\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/os/ParcelUuid.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/os/ParcelUuid\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/android/os/ParcelUuid.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/ParcelUuid\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/android/os/ParcelUuid.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/os/ParcelUuid\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/android/os/ParcelUuid.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/ParcelUuid\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/android/os/ParcelUuid.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/os/ParcelUuid\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [describeContents](https://developer.android.com/reference/android/os/ParcelUuid.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/ParcelUuid\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [describeContents](https://developer.android.com/reference/android/os/ParcelUuid.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/os/ParcelUuid", java.flags == PUBLIC, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/os/ParcelUuid\0", "describeContents\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public interface [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) - public interface Parcelable ("android/os/Parcelable\0") extends super::super::java::lang::Object { + /// pub interface [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) + #[repr(transparent)] + pub struct Parcelable(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for Parcelable {} - /// [describeContents](https://developer.android.com/reference/android/os/Parcelable.html#describeContents()) - pub fn describeContents<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/os/Parcelable", java.flags == PUBLIC | ABSTRACT, .name == "describeContents", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/Parcelable\0", "describeContents\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for Parcelable { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/os/Parcelable\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for Parcelable {} + impl ::std::ops::Deref for Parcelable { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl Parcelable { + /// [describeContents](https://developer.android.com/reference/android/os/Parcelable.html#describeContents()) + pub fn describeContents<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/os/Parcelable", java.flags == PUBLIC | ABSTRACT, .name == "describeContents", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/os/Parcelable\0", "describeContents\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// public static final [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR) - pub const CONTENTS_FILE_DESCRIPTOR : i32 = 1; + /// public static final [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR) + pub const CONTENTS_FILE_DESCRIPTOR: i32 = 1; - /// public static final [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE) - pub const PARCELABLE_WRITE_RETURN_VALUE : i32 = 1; - } + /// public static final [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE) + pub const PARCELABLE_WRITE_RETURN_VALUE: i32 = 1; } } pub mod util { - ::java_spaghetti::class! { - /// public class [SparseArray](https://developer.android.com/reference/android/util/SparseArray.html) - public class SparseArray ("android/util/SparseArray\0") extends super::super::java::lang::Object { + /// pub class [SparseArray](https://developer.android.com/reference/android/util/SparseArray.html) + #[repr(transparent)] + pub struct SparseArray(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for SparseArray {} - /// [SparseArray](https://developer.android.com/reference/android/util/SparseArray.html#SparseArray()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for SparseArray { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("android/util/SparseArray\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for SparseArray {} + impl ::std::ops::Deref for SparseArray { + type Target = super::super::java::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl SparseArray { + /// [SparseArray](https://developer.android.com/reference/android/util/SparseArray.html#SparseArray()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "\0", "()V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [SparseArray](https://developer.android.com/reference/android/util/SparseArray.html#SparseArray(int)) - pub fn new_int<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "\0", "(I)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [SparseArray](https://developer.android.com/reference/android/util/SparseArray.html#SparseArray(int)) + pub fn new_int<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: i32, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "\0", "(I)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [clone](https://developer.android.com/reference/android/util/SparseArray.html#clone()) - pub fn clone<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, SparseArray>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "clone", .descriptor == "()Landroid/util/SparseArray;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "clone\0", "()Landroid/util/SparseArray;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [clone](https://developer.android.com/reference/android/util/SparseArray.html#clone()) + pub fn clone<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, SparseArray>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "clone", .descriptor == "()Landroid/util/SparseArray;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "clone\0", + "()Landroid/util/SparseArray;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [contains](https://developer.android.com/reference/android/util/SparseArray.html#contains(int)) - pub fn contains<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "contains", .descriptor == "(I)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "contains\0", "(I)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [contains](https://developer.android.com/reference/android/util/SparseArray.html#contains(int)) + pub fn contains<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "contains", .descriptor == "(I)Z" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "contains\0", "(I)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [get](https://developer.android.com/reference/android/util/SparseArray.html#get(int)) - pub fn get_int<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::Object>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "get", .descriptor == "(I)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "get\0", "(I)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [get](https://developer.android.com/reference/android/util/SparseArray.html#get(int)) + pub fn get_int<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::Object>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "get", .descriptor == "(I)Ljava/lang/Object;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "get\0", + "(I)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [get](https://developer.android.com/reference/android/util/SparseArray.html#get(int,%20java.lang.Object)) - pub fn get_int_Object<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::Object>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "get", .descriptor == "(ILjava/lang/Object;)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "get\0", "(ILjava/lang/Object;)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [get](https://developer.android.com/reference/android/util/SparseArray.html#get(int,%20java.lang.Object)) + pub fn get_int_Object<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::Object>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "get", .descriptor == "(ILjava/lang/Object;)Ljava/lang/Object;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "get\0", + "(ILjava/lang/Object;)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [delete](https://developer.android.com/reference/android/util/SparseArray.html#delete(int)) - pub fn delete<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "delete", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "delete\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [delete](https://developer.android.com/reference/android/util/SparseArray.html#delete(int)) + pub fn delete<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "delete", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "delete\0", "(I)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [remove](https://developer.android.com/reference/android/util/SparseArray.html#remove(int)) - pub fn remove<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "remove", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "remove\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [remove](https://developer.android.com/reference/android/util/SparseArray.html#remove(int)) + pub fn remove<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "remove", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "remove\0", "(I)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } - - /// [removeAt](https://developer.android.com/reference/android/util/SparseArray.html#removeAt(int)) - pub fn removeAt<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "removeAt", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "removeAt\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + } + + /// [removeAt](https://developer.android.com/reference/android/util/SparseArray.html#removeAt(int)) + pub fn removeAt<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "removeAt", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "removeAt\0", "(I)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [removeAtRange](https://developer.android.com/reference/android/util/SparseArray.html#removeAtRange(int,%20int)) - pub fn removeAtRange<'env>(&'env self, arg0: i32, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "removeAtRange", .descriptor == "(II)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "removeAtRange\0", "(II)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [removeAtRange](https://developer.android.com/reference/android/util/SparseArray.html#removeAtRange(int,%20int)) + pub fn removeAtRange<'env>( + &'env self, + arg0: i32, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "removeAtRange", .descriptor == "(II)V" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "removeAtRange\0", "(II)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [set](https://developer.android.com/reference/android/util/SparseArray.html#set(int,%20java.lang.Object)) - pub fn set<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "set", .descriptor == "(ILjava/lang/Object;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "set\0", "(ILjava/lang/Object;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [set](https://developer.android.com/reference/android/util/SparseArray.html#set(int,%20java.lang.Object)) + pub fn set<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "set", .descriptor == "(ILjava/lang/Object;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "set\0", + "(ILjava/lang/Object;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [put](https://developer.android.com/reference/android/util/SparseArray.html#put(int,%20java.lang.Object)) - pub fn put<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "put", .descriptor == "(ILjava/lang/Object;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "put\0", "(ILjava/lang/Object;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [put](https://developer.android.com/reference/android/util/SparseArray.html#put(int,%20java.lang.Object)) + pub fn put<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "put", .descriptor == "(ILjava/lang/Object;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "put\0", + "(ILjava/lang/Object;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [size](https://developer.android.com/reference/android/util/SparseArray.html#size()) - pub fn size<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "size", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "size\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [size](https://developer.android.com/reference/android/util/SparseArray.html#size()) + pub fn size<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "size", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "size\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [keyAt](https://developer.android.com/reference/android/util/SparseArray.html#keyAt(int)) - pub fn keyAt<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "keyAt", .descriptor == "(I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "keyAt\0", "(I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [keyAt](https://developer.android.com/reference/android/util/SparseArray.html#keyAt(int)) + pub fn keyAt<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "keyAt", .descriptor == "(I)I" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "keyAt\0", "(I)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [valueAt](https://developer.android.com/reference/android/util/SparseArray.html#valueAt(int)) - pub fn valueAt<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::Object>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "valueAt", .descriptor == "(I)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "valueAt\0", "(I)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [valueAt](https://developer.android.com/reference/android/util/SparseArray.html#valueAt(int)) + pub fn valueAt<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::Object>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "valueAt", .descriptor == "(I)Ljava/lang/Object;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "valueAt\0", + "(I)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setValueAt](https://developer.android.com/reference/android/util/SparseArray.html#setValueAt(int,%20java.lang.Object)) - pub fn setValueAt<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "setValueAt", .descriptor == "(ILjava/lang/Object;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "setValueAt\0", "(ILjava/lang/Object;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setValueAt](https://developer.android.com/reference/android/util/SparseArray.html#setValueAt(int,%20java.lang.Object)) + pub fn setValueAt<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "setValueAt", .descriptor == "(ILjava/lang/Object;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "setValueAt\0", + "(ILjava/lang/Object;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [indexOfKey](https://developer.android.com/reference/android/util/SparseArray.html#indexOfKey(int)) - pub fn indexOfKey<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "indexOfKey", .descriptor == "(I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "indexOfKey\0", "(I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [indexOfKey](https://developer.android.com/reference/android/util/SparseArray.html#indexOfKey(int)) + pub fn indexOfKey<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "indexOfKey", .descriptor == "(I)I" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "indexOfKey\0", "(I)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [indexOfValue](https://developer.android.com/reference/android/util/SparseArray.html#indexOfValue(java.lang.Object)) - pub fn indexOfValue<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "indexOfValue", .descriptor == "(Ljava/lang/Object;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "indexOfValue\0", "(Ljava/lang/Object;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [indexOfValue](https://developer.android.com/reference/android/util/SparseArray.html#indexOfValue(java.lang.Object)) + pub fn indexOfValue<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "indexOfValue", .descriptor == "(Ljava/lang/Object;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "indexOfValue\0", + "(Ljava/lang/Object;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [clear](https://developer.android.com/reference/android/util/SparseArray.html#clear()) - pub fn clear<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "clear", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "clear\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [clear](https://developer.android.com/reference/android/util/SparseArray.html#clear()) + pub fn clear<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "clear", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "clear\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [append](https://developer.android.com/reference/android/util/SparseArray.html#append(int,%20java.lang.Object)) - pub fn append<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::java::lang::Object>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "append", .descriptor == "(ILjava/lang/Object;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "append\0", "(ILjava/lang/Object;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [append](https://developer.android.com/reference/android/util/SparseArray.html#append(int,%20java.lang.Object)) + pub fn append<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "append", .descriptor == "(ILjava/lang/Object;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "append\0", + "(ILjava/lang/Object;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/android/util/SparseArray.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/android/util/SparseArray.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::super::java::lang::String>>, + ::java_spaghetti::Local<'env, super::super::java::lang::Throwable>, + > { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [contentEquals](https://developer.android.com/reference/android/util/SparseArray.html#contentEquals(android.util.SparseArray)) - pub fn contentEquals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env SparseArray>>) -> ::std::result::Result> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "contentEquals", .descriptor == "(Landroid/util/SparseArray;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "contentEquals\0", "(Landroid/util/SparseArray;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [contentEquals](https://developer.android.com/reference/android/util/SparseArray.html#contentEquals(android.util.SparseArray)) + pub fn contentEquals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "contentEquals", .descriptor == "(Landroid/util/SparseArray;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "android/util/SparseArray\0", + "contentEquals\0", + "(Landroid/util/SparseArray;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [contentHashCode](https://developer.android.com/reference/android/util/SparseArray.html#contentHashCode()) - pub fn contentHashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "contentHashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("android/util/SparseArray\0", "contentHashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [contentHashCode](https://developer.android.com/reference/android/util/SparseArray.html#contentHashCode()) + pub fn contentHashCode<'env>( + &'env self, + ) -> ::std::result::Result> + { + // class.path == "android/util/SparseArray", java.flags == PUBLIC, .name == "contentHashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("android/util/SparseArray\0", "contentHashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } @@ -8863,40 +15106,95 @@ pub mod com { pub mod android { - ::java_spaghetti::class! { - /// public class [BluestScanCallback](https://developer.android.com/reference/com/github/alexmoon/bluest/android/BluestScanCallback.html) - public class BluestScanCallback ("com/github/alexmoon/bluest/android/BluestScanCallback\0") extends super::super::super::super::super::android::bluetooth::le::ScanCallback { - - /// [BluestScanCallback](https://developer.android.com/reference/com/github/alexmoon/bluest/android/BluestScanCallback.html#BluestScanCallback(int)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::super::super::super::super::java::lang::Throwable>> { - // class.path == "com/github/alexmoon/bluest/android/BluestScanCallback", java.flags == PUBLIC, .name == "", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("com/github/alexmoon/bluest/android/BluestScanCallback\0", "\0", "(I)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// pub class [BluestScanCallback](https://developer.android.com/reference/com/github/alexmoon/bluest/android/BluestScanCallback.html) + #[repr(transparent)] + pub struct BluestScanCallback(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for BluestScanCallback {} + + unsafe impl ::java_spaghetti::JniType for BluestScanCallback { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("com/github/alexmoon/bluest/android/BluestScanCallback\0") + } + } + unsafe impl + ::java_spaghetti::AssignableTo< + super::super::super::super::super::android::bluetooth::le::ScanCallback, + > for BluestScanCallback + { + } + unsafe impl ::java_spaghetti::AssignableTo + for BluestScanCallback + { + } + impl ::std::ops::Deref for BluestScanCallback { + type Target = super::super::super::super::super::android::bluetooth::le::ScanCallback; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl BluestScanCallback { + /// [BluestScanCallback](https://developer.android.com/reference/com/github/alexmoon/bluest/android/BluestScanCallback.html#BluestScanCallback(int)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: i32, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::super::super::super::super::java::lang::Throwable>, + > { + // class.path == "com/github/alexmoon/bluest/android/BluestScanCallback", java.flags == PUBLIC, .name == "", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "com/github/alexmoon/bluest/android/BluestScanCallback\0", + "\0", + "(I)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [onScanResult](https://developer.android.com/reference/com/github/alexmoon/bluest/android/BluestScanCallback.html#onScanResult(int,%20android.bluetooth.le.ScanResult)) - pub fn onScanResult<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::super::super::super::super::android::bluetooth::le::ScanResult>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::super::super::java::lang::Throwable>> { - // class.path == "com/github/alexmoon/bluest/android/BluestScanCallback", java.flags == PUBLIC, .name == "onScanResult", .descriptor == "(ILandroid/bluetooth/le/ScanResult;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("com/github/alexmoon/bluest/android/BluestScanCallback\0", "onScanResult\0", "(ILandroid/bluetooth/le/ScanResult;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onScanResult](https://developer.android.com/reference/com/github/alexmoon/bluest/android/BluestScanCallback.html#onScanResult(int,%20android.bluetooth.le.ScanResult)) + pub fn onScanResult<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg< + super::super::super::super::super::android::bluetooth::le::ScanResult, + >, + ) -> ::std::result::Result< + (), + ::java_spaghetti::Local<'env, super::super::super::super::super::java::lang::Throwable>, + > { + // class.path == "com/github/alexmoon/bluest/android/BluestScanCallback", java.flags == PUBLIC, .name == "onScanResult", .descriptor == "(ILandroid/bluetooth/le/ScanResult;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "com/github/alexmoon/bluest/android/BluestScanCallback\0", + "onScanResult\0", + "(ILandroid/bluetooth/le/ScanResult;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [onScanFailed](https://developer.android.com/reference/com/github/alexmoon/bluest/android/BluestScanCallback.html#onScanFailed(int)) - pub fn onScanFailed<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::super::super::super::super::java::lang::Throwable>> { - // class.path == "com/github/alexmoon/bluest/android/BluestScanCallback", java.flags == PUBLIC, .name == "onScanFailed", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("com/github/alexmoon/bluest/android/BluestScanCallback\0", "onScanFailed\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [onScanFailed](https://developer.android.com/reference/com/github/alexmoon/bluest/android/BluestScanCallback.html#onScanFailed(int)) + pub fn onScanFailed<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + (), + ::java_spaghetti::Local<'env, super::super::super::super::super::java::lang::Throwable>, + > { + // class.path == "com/github/alexmoon/bluest/android/BluestScanCallback", java.flags == PUBLIC, .name == "onScanFailed", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "com/github/alexmoon/bluest/android/BluestScanCallback\0", + "onScanFailed\0", + "(I)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } @@ -8910,252 +15208,399 @@ pub mod java { pub mod io { - ::java_spaghetti::class! { - /// public class [InputStream](https://developer.android.com/reference/java/io/InputStream.html) - public class InputStream ("java/io/InputStream\0") extends super::lang::Object { + /// pub class [InputStream](https://developer.android.com/reference/java/io/InputStream.html) + #[repr(transparent)] + pub struct InputStream(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for InputStream {} - /// [InputStream](https://developer.android.com/reference/java/io/InputStream.html#InputStream()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for InputStream { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/io/InputStream\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for InputStream {} + impl ::std::ops::Deref for InputStream { + type Target = super::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl InputStream { + /// [InputStream](https://developer.android.com/reference/java/io/InputStream.html#InputStream()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "\0", "()V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [nullInputStream](https://developer.android.com/reference/java/io/InputStream.html#nullInputStream()) - pub fn nullInputStream<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, InputStream>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/InputStream", java.flags == PUBLIC | STATIC, .name == "nullInputStream", .descriptor == "()Ljava/io/InputStream;" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/io/InputStream\0", "nullInputStream\0", "()Ljava/io/InputStream;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [nullInputStream](https://developer.android.com/reference/java/io/InputStream.html#nullInputStream()) + pub fn nullInputStream<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, InputStream>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/io/InputStream", java.flags == PUBLIC | STATIC, .name == "nullInputStream", .descriptor == "()Ljava/io/InputStream;" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/io/InputStream\0", + "nullInputStream\0", + "()Ljava/io/InputStream;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [read](https://developer.android.com/reference/java/io/InputStream.html#read()) - pub fn read<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/io/InputStream", java.flags == PUBLIC | ABSTRACT, .name == "read", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "read\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [read](https://developer.android.com/reference/java/io/InputStream.html#read()) + pub fn read<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/io/InputStream", java.flags == PUBLIC | ABSTRACT, .name == "read", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "read\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [read](https://developer.android.com/reference/java/io/InputStream.html#read(byte%5B%5D)) - pub fn read_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "read", .descriptor == "([B)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "read\0", "([B)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [read](https://developer.android.com/reference/java/io/InputStream.html#read(byte%5B%5D)) + pub fn read_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result> { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "read", .descriptor == "([B)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "read\0", "([B)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [read](https://developer.android.com/reference/java/io/InputStream.html#read(byte%5B%5D,%20int,%20int)) - pub fn read_byte_array_int_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg1: i32, arg2: i32) -> ::std::result::Result> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "read", .descriptor == "([BII)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "read\0", "([BII)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [read](https://developer.android.com/reference/java/io/InputStream.html#read(byte%5B%5D,%20int,%20int)) + pub fn read_byte_array_int_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result> { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "read", .descriptor == "([BII)I" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "read\0", "([BII)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [readAllBytes](https://developer.android.com/reference/java/io/InputStream.html#readAllBytes()) - pub fn readAllBytes<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "readAllBytes", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "readAllBytes\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [readAllBytes](https://developer.android.com/reference/java/io/InputStream.html#readAllBytes()) + pub fn readAllBytes<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "readAllBytes", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "readAllBytes\0", "()[B\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [readNBytes](https://developer.android.com/reference/java/io/InputStream.html#readNBytes(int)) - pub fn readNBytes_int<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "readNBytes", .descriptor == "(I)[B" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "readNBytes\0", "(I)[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [readNBytes](https://developer.android.com/reference/java/io/InputStream.html#readNBytes(int)) + pub fn readNBytes_int<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "readNBytes", .descriptor == "(I)[B" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "readNBytes\0", "(I)[B\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [readNBytes](https://developer.android.com/reference/java/io/InputStream.html#readNBytes(byte%5B%5D,%20int,%20int)) - pub fn readNBytes_byte_array_int_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg1: i32, arg2: i32) -> ::std::result::Result> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "readNBytes", .descriptor == "([BII)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "readNBytes\0", "([BII)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [readNBytes](https://developer.android.com/reference/java/io/InputStream.html#readNBytes(byte%5B%5D,%20int,%20int)) + pub fn readNBytes_byte_array_int_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result> { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "readNBytes", .descriptor == "([BII)I" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "readNBytes\0", "([BII)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [skip](https://developer.android.com/reference/java/io/InputStream.html#skip(long)) - pub fn skip<'env>(&'env self, arg0: i64) -> ::std::result::Result> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "skip", .descriptor == "(J)J" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "skip\0", "(J)J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [skip](https://developer.android.com/reference/java/io/InputStream.html#skip(long)) + pub fn skip<'env>( + &'env self, + arg0: i64, + ) -> ::std::result::Result> { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "skip", .descriptor == "(J)J" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "skip\0", "(J)J\0"); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [available](https://developer.android.com/reference/java/io/InputStream.html#available()) - pub fn available<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "available", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "available\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [available](https://developer.android.com/reference/java/io/InputStream.html#available()) + pub fn available<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "available", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "available\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [close](https://developer.android.com/reference/java/io/InputStream.html#close()) - pub fn close<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "close", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "close\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [close](https://developer.android.com/reference/java/io/InputStream.html#close()) + pub fn close<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "close", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "close\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [mark](https://developer.android.com/reference/java/io/InputStream.html#mark(int)) - pub fn mark<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/InputStream", java.flags == PUBLIC | SYNCRONIZED, .name == "mark", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "mark\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [mark](https://developer.android.com/reference/java/io/InputStream.html#mark(int)) + pub fn mark<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/io/InputStream", java.flags == PUBLIC | SYNCRONIZED, .name == "mark", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "mark\0", "(I)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [reset](https://developer.android.com/reference/java/io/InputStream.html#reset()) - pub fn reset<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/InputStream", java.flags == PUBLIC | SYNCRONIZED, .name == "reset", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "reset\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [reset](https://developer.android.com/reference/java/io/InputStream.html#reset()) + pub fn reset<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/io/InputStream", java.flags == PUBLIC | SYNCRONIZED, .name == "reset", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "reset\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [markSupported](https://developer.android.com/reference/java/io/InputStream.html#markSupported()) - pub fn markSupported<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "markSupported", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "markSupported\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [markSupported](https://developer.android.com/reference/java/io/InputStream.html#markSupported()) + pub fn markSupported<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "markSupported", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/InputStream\0", "markSupported\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [transferTo](https://developer.android.com/reference/java/io/InputStream.html#transferTo(java.io.OutputStream)) - pub fn transferTo<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env OutputStream>>) -> ::std::result::Result> { - // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "transferTo", .descriptor == "(Ljava/io/OutputStream;)J" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/InputStream\0", "transferTo\0", "(Ljava/io/OutputStream;)J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [transferTo](https://developer.android.com/reference/java/io/InputStream.html#transferTo(java.io.OutputStream)) + pub fn transferTo<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/io/InputStream", java.flags == PUBLIC, .name == "transferTo", .descriptor == "(Ljava/io/OutputStream;)J" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/io/InputStream\0", + "transferTo\0", + "(Ljava/io/OutputStream;)J\0", + ); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public class [OutputStream](https://developer.android.com/reference/java/io/OutputStream.html) - public class OutputStream ("java/io/OutputStream\0") extends super::lang::Object { + /// pub class [OutputStream](https://developer.android.com/reference/java/io/OutputStream.html) + #[repr(transparent)] + pub struct OutputStream(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for OutputStream {} - /// [OutputStream](https://developer.android.com/reference/java/io/OutputStream.html#OutputStream()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/OutputStream\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for OutputStream { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/io/OutputStream\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for OutputStream {} + impl ::std::ops::Deref for OutputStream { + type Target = super::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl OutputStream { + /// [OutputStream](https://developer.android.com/reference/java/io/OutputStream.html#OutputStream()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/OutputStream\0", "\0", "()V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [nullOutputStream](https://developer.android.com/reference/java/io/OutputStream.html#nullOutputStream()) - pub fn nullOutputStream<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, OutputStream>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/OutputStream", java.flags == PUBLIC | STATIC, .name == "nullOutputStream", .descriptor == "()Ljava/io/OutputStream;" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/io/OutputStream\0", "nullOutputStream\0", "()Ljava/io/OutputStream;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [nullOutputStream](https://developer.android.com/reference/java/io/OutputStream.html#nullOutputStream()) + pub fn nullOutputStream<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, OutputStream>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/io/OutputStream", java.flags == PUBLIC | STATIC, .name == "nullOutputStream", .descriptor == "()Ljava/io/OutputStream;" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/io/OutputStream\0", + "nullOutputStream\0", + "()Ljava/io/OutputStream;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [write](https://developer.android.com/reference/java/io/OutputStream.html#write(int)) - pub fn write_int<'env>(&'env self, arg0: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/OutputStream", java.flags == PUBLIC | ABSTRACT, .name == "write", .descriptor == "(I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/OutputStream\0", "write\0", "(I)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [write](https://developer.android.com/reference/java/io/OutputStream.html#write(int)) + pub fn write_int<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/io/OutputStream", java.flags == PUBLIC | ABSTRACT, .name == "write", .descriptor == "(I)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/OutputStream\0", "write\0", "(I)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [write](https://developer.android.com/reference/java/io/OutputStream.html#write(byte%5B%5D)) - pub fn write_byte_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "write", .descriptor == "([B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/OutputStream\0", "write\0", "([B)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [write](https://developer.android.com/reference/java/io/OutputStream.html#write(byte%5B%5D)) + pub fn write_byte_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "write", .descriptor == "([B)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/OutputStream\0", "write\0", "([B)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [write](https://developer.android.com/reference/java/io/OutputStream.html#write(byte%5B%5D,%20int,%20int)) - pub fn write_byte_array_int_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg1: i32, arg2: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "write", .descriptor == "([BII)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/OutputStream\0", "write\0", "([BII)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [write](https://developer.android.com/reference/java/io/OutputStream.html#write(byte%5B%5D,%20int,%20int)) + pub fn write_byte_array_int_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "write", .descriptor == "([BII)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/OutputStream\0", "write\0", "([BII)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [flush](https://developer.android.com/reference/java/io/OutputStream.html#flush()) - pub fn flush<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "flush", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/OutputStream\0", "flush\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [flush](https://developer.android.com/reference/java/io/OutputStream.html#flush()) + pub fn flush<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "flush", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/OutputStream\0", "flush\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [close](https://developer.android.com/reference/java/io/OutputStream.html#close()) - pub fn close<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "close", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/io/OutputStream\0", "close\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [close](https://developer.android.com/reference/java/io/OutputStream.html#close()) + pub fn close<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/io/OutputStream", java.flags == PUBLIC, .name == "close", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/io/OutputStream\0", "close\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } @@ -9163,2337 +15608,4372 @@ pub mod java { pub mod lang { - ::java_spaghetti::class! { - /// public class [Object](https://developer.android.com/reference/java/lang/Object.html) - public class Object ("java/lang/Object\0") extends () { + /// pub class [Object](https://developer.android.com/reference/java/lang/Object.html) + #[repr(transparent)] + pub struct Object(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for Object {} - /// [Object](https://developer.android.com/reference/java/lang/Object.html#Object()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Object", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Object\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for Object { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/lang/Object\0") + } + } + impl Object { + /// [Object](https://developer.android.com/reference/java/lang/Object.html#Object()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/Object", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Object\0", "\0", "()V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/java/lang/Object.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/lang/Object", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Object\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/java/lang/Object.html#hashCode()) + pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { + // class.path == "java/lang/Object", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Object\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/java/lang/Object.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env Object>>) -> ::std::result::Result> { - // class.path == "java/lang/Object", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Object\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/java/lang/Object.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/Object", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Object\0", "equals\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/java/lang/Object.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Object", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Object\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/java/lang/Object.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/Object", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Object\0", "toString\0", "()Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [notify](https://developer.android.com/reference/java/lang/Object.html#notify()) - pub fn notify<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL | NATIVE, .name == "notify", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Object\0", "notify\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [notify](https://developer.android.com/reference/java/lang/Object.html#notify()) + pub fn notify<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL | NATIVE, .name == "notify", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Object\0", "notify\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [notifyAll](https://developer.android.com/reference/java/lang/Object.html#notifyAll()) - pub fn notifyAll<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL | NATIVE, .name == "notifyAll", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Object\0", "notifyAll\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [notifyAll](https://developer.android.com/reference/java/lang/Object.html#notifyAll()) + pub fn notifyAll<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL | NATIVE, .name == "notifyAll", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Object\0", "notifyAll\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [wait](https://developer.android.com/reference/java/lang/Object.html#wait(long)) - pub fn wait_long<'env>(&'env self, arg0: i64) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL, .name == "wait", .descriptor == "(J)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Object\0", "wait\0", "(J)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [wait](https://developer.android.com/reference/java/lang/Object.html#wait(long)) + pub fn wait_long<'env>( + &'env self, + arg0: i64, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL, .name == "wait", .descriptor == "(J)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Object\0", "wait\0", "(J)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [wait](https://developer.android.com/reference/java/lang/Object.html#wait(long,%20int)) - pub fn wait_long_int<'env>(&'env self, arg0: i64, arg1: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL | NATIVE, .name == "wait", .descriptor == "(JI)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Object\0", "wait\0", "(JI)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [wait](https://developer.android.com/reference/java/lang/Object.html#wait(long,%20int)) + pub fn wait_long_int<'env>( + &'env self, + arg0: i64, + arg1: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL | NATIVE, .name == "wait", .descriptor == "(JI)V" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Object\0", "wait\0", "(JI)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [wait](https://developer.android.com/reference/java/lang/Object.html#wait()) - pub fn wait<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL, .name == "wait", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Object\0", "wait\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [wait](https://developer.android.com/reference/java/lang/Object.html#wait()) + pub fn wait<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/Object", java.flags == PUBLIC | FINAL, .name == "wait", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Object\0", "wait\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [StackTraceElement](https://developer.android.com/reference/java/lang/StackTraceElement.html) - public final class StackTraceElement ("java/lang/StackTraceElement\0") extends Object { + /// pub final class [StackTraceElement](https://developer.android.com/reference/java/lang/StackTraceElement.html) + #[repr(transparent)] + pub struct StackTraceElement(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for StackTraceElement {} - /// [StackTraceElement](https://developer.android.com/reference/java/lang/StackTraceElement.html#StackTraceElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20int)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg3: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/StackTraceElement\0", "\0", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for StackTraceElement { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/lang/StackTraceElement\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for StackTraceElement {} + impl ::std::ops::Deref for StackTraceElement { + type Target = Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl StackTraceElement { + /// [StackTraceElement](https://developer.android.com/reference/java/lang/StackTraceElement.html#StackTraceElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20int)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: i32, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/StackTraceElement\0", + "\0", + "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [getFileName](https://developer.android.com/reference/java/lang/StackTraceElement.html#getFileName()) - pub fn getFileName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "getFileName", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/StackTraceElement\0", "getFileName\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getFileName](https://developer.android.com/reference/java/lang/StackTraceElement.html#getFileName()) + pub fn getFileName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "getFileName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/StackTraceElement\0", + "getFileName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getLineNumber](https://developer.android.com/reference/java/lang/StackTraceElement.html#getLineNumber()) - pub fn getLineNumber<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "getLineNumber", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/StackTraceElement\0", "getLineNumber\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getLineNumber](https://developer.android.com/reference/java/lang/StackTraceElement.html#getLineNumber()) + pub fn getLineNumber<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "getLineNumber", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/StackTraceElement\0", "getLineNumber\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getClassName](https://developer.android.com/reference/java/lang/StackTraceElement.html#getClassName()) - pub fn getClassName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "getClassName", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/StackTraceElement\0", "getClassName\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getClassName](https://developer.android.com/reference/java/lang/StackTraceElement.html#getClassName()) + pub fn getClassName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "getClassName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/StackTraceElement\0", + "getClassName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getMethodName](https://developer.android.com/reference/java/lang/StackTraceElement.html#getMethodName()) - pub fn getMethodName<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "getMethodName", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/StackTraceElement\0", "getMethodName\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getMethodName](https://developer.android.com/reference/java/lang/StackTraceElement.html#getMethodName()) + pub fn getMethodName<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "getMethodName", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/StackTraceElement\0", + "getMethodName\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isNativeMethod](https://developer.android.com/reference/java/lang/StackTraceElement.html#isNativeMethod()) - pub fn isNativeMethod<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "isNativeMethod", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/StackTraceElement\0", "isNativeMethod\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isNativeMethod](https://developer.android.com/reference/java/lang/StackTraceElement.html#isNativeMethod()) + pub fn isNativeMethod<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "isNativeMethod", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/StackTraceElement\0", "isNativeMethod\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/java/lang/StackTraceElement.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/StackTraceElement\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/java/lang/StackTraceElement.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/StackTraceElement\0", + "toString\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/java/lang/StackTraceElement.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env Object>>) -> ::std::result::Result> { - // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/StackTraceElement\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/java/lang/StackTraceElement.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/StackTraceElement\0", + "equals\0", + "(Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/java/lang/StackTraceElement.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/StackTraceElement\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/java/lang/StackTraceElement.html#hashCode()) + pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { + // class.path == "java/lang/StackTraceElement", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/StackTraceElement\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [String](https://developer.android.com/reference/java/lang/String.html) - public final class String ("java/lang/String\0") extends Object { + /// pub final class [String](https://developer.android.com/reference/java/lang/String.html) + #[repr(transparent)] + pub struct String(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for String {} - /// [String](https://developer.android.com/reference/java/lang/String.html#String()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for String { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/lang/String\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for String {} + impl ::std::ops::Deref for String { + type Target = Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl String { + /// [String](https://developer.android.com/reference/java/lang/String.html#String()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "()V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(java.lang.String)) - pub fn new_String<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "(Ljava/lang/String;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(java.lang.String)) + pub fn new_String<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "(Ljava/lang/String;)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(char%5B%5D)) - pub fn new_char_array<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::CharArray>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([C)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "([C)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(char%5B%5D)) + pub fn new_char_array<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::CharArray>, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([C)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "([C)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(char%5B%5D,%20int,%20int)) - pub fn new_char_array_int_int<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::CharArray>>, arg1: i32, arg2: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([CII)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "([CII)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(char%5B%5D,%20int,%20int)) + pub fn new_char_array_int_int<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::CharArray>, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([CII)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "([CII)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(int%5B%5D,%20int,%20int)) - pub fn new_int_array_int_int<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::IntArray>>, arg1: i32, arg2: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([III)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "([III)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(int%5B%5D,%20int,%20int)) + pub fn new_int_array_int_int<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::IntArray>, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([III)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "([III)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20int,%20int,%20int)) - #[deprecated] pub fn new_byte_array_int_int_int<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg1: i32, arg2: i32, arg3: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BIII)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "([BIII)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20int,%20int,%20int)) + #[deprecated] + pub fn new_byte_array_int_int_int<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg1: i32, + arg2: i32, + arg3: i32, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BIII)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "([BIII)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20int)) - #[deprecated] pub fn new_byte_array_int<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg1: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BI)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "([BI)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20int)) + #[deprecated] + pub fn new_byte_array_int<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg1: i32, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BI)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "([BI)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20int,%20int,%20java.lang.String)) - pub fn new_byte_array_int_int_String<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg1: i32, arg2: i32, arg3: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BIILjava/lang/String;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "([BIILjava/lang/String;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20int,%20int,%20java.lang.String)) + pub fn new_byte_array_int_int_String<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg1: i32, + arg2: i32, + arg3: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BIILjava/lang/String;)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + arg3.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "([BIILjava/lang/String;)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20java.lang.String)) - pub fn new_byte_array_String<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BLjava/lang/String;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "([BLjava/lang/String;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20java.lang.String)) + pub fn new_byte_array_String<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BLjava/lang/String;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "([BLjava/lang/String;)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20int,%20int)) - pub fn new_byte_array_int_int<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg1: i32, arg2: i32) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BII)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "([BII)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D,%20int,%20int)) + pub fn new_byte_array_int_int<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([BII)V" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "([BII)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D)) - pub fn new_byte_array<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([B)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "\0", "([B)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [String](https://developer.android.com/reference/java/lang/String.html#String(byte%5B%5D)) + pub fn new_byte_array<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "", .descriptor == "([B)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "\0", "([B)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [length](https://developer.android.com/reference/java/lang/String.html#length()) - pub fn length<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "length", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "length\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [length](https://developer.android.com/reference/java/lang/String.html#length()) + pub fn length<'env>(&'env self) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "length", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "length\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isEmpty](https://developer.android.com/reference/java/lang/String.html#isEmpty()) - pub fn isEmpty<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "isEmpty", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "isEmpty\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isEmpty](https://developer.android.com/reference/java/lang/String.html#isEmpty()) + pub fn isEmpty<'env>(&'env self) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "isEmpty", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "isEmpty\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [charAt](https://developer.android.com/reference/java/lang/String.html#charAt(int)) - pub fn charAt<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "charAt", .descriptor == "(I)C" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "charAt\0", "(I)C\0"); - __jni_env.call_char_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [charAt](https://developer.android.com/reference/java/lang/String.html#charAt(int)) + pub fn charAt<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "charAt", .descriptor == "(I)C" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "charAt\0", "(I)C\0"); + __jni_env.call_char_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [codePointAt](https://developer.android.com/reference/java/lang/String.html#codePointAt(int)) - pub fn codePointAt<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "codePointAt", .descriptor == "(I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "codePointAt\0", "(I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [codePointAt](https://developer.android.com/reference/java/lang/String.html#codePointAt(int)) + pub fn codePointAt<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "codePointAt", .descriptor == "(I)I" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "codePointAt\0", "(I)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [codePointBefore](https://developer.android.com/reference/java/lang/String.html#codePointBefore(int)) - pub fn codePointBefore<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "codePointBefore", .descriptor == "(I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "codePointBefore\0", "(I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [codePointBefore](https://developer.android.com/reference/java/lang/String.html#codePointBefore(int)) + pub fn codePointBefore<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "codePointBefore", .descriptor == "(I)I" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "codePointBefore\0", "(I)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [codePointCount](https://developer.android.com/reference/java/lang/String.html#codePointCount(int,%20int)) - pub fn codePointCount<'env>(&'env self, arg0: i32, arg1: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "codePointCount", .descriptor == "(II)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "codePointCount\0", "(II)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [codePointCount](https://developer.android.com/reference/java/lang/String.html#codePointCount(int,%20int)) + pub fn codePointCount<'env>( + &'env self, + arg0: i32, + arg1: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "codePointCount", .descriptor == "(II)I" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "codePointCount\0", "(II)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [offsetByCodePoints](https://developer.android.com/reference/java/lang/String.html#offsetByCodePoints(int,%20int)) - pub fn offsetByCodePoints<'env>(&'env self, arg0: i32, arg1: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "offsetByCodePoints", .descriptor == "(II)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "offsetByCodePoints\0", "(II)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [offsetByCodePoints](https://developer.android.com/reference/java/lang/String.html#offsetByCodePoints(int,%20int)) + pub fn offsetByCodePoints<'env>( + &'env self, + arg0: i32, + arg1: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "offsetByCodePoints", .descriptor == "(II)I" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "offsetByCodePoints\0", "(II)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getChars](https://developer.android.com/reference/java/lang/String.html#getChars(int,%20int,%20char%5B%5D,%20int)) - pub fn getChars<'env>(&'env self, arg0: i32, arg1: i32, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::CharArray>>, arg3: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "getChars", .descriptor == "(II[CI)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "getChars\0", "(II[CI)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getChars](https://developer.android.com/reference/java/lang/String.html#getChars(int,%20int,%20char%5B%5D,%20int)) + pub fn getChars<'env>( + &'env self, + arg0: i32, + arg1: i32, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::CharArray>, + arg3: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "getChars", .descriptor == "(II[CI)V" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + arg2.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "getChars\0", "(II[CI)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getBytes](https://developer.android.com/reference/java/lang/String.html#getBytes(int,%20int,%20byte%5B%5D,%20int)) - #[deprecated] pub fn getBytes_int_int_byte_array_int<'env>(&'env self, arg0: i32, arg1: i32, arg2: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>, arg3: i32) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "getBytes", .descriptor == "(II[BI)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "getBytes\0", "(II[BI)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBytes](https://developer.android.com/reference/java/lang/String.html#getBytes(int,%20int,%20byte%5B%5D,%20int)) + #[deprecated] + pub fn getBytes_int_int_byte_array_int<'env>( + &'env self, + arg0: i32, + arg1: i32, + arg2: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + arg3: i32, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "getBytes", .descriptor == "(II[BI)V" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + arg2.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "getBytes\0", "(II[BI)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getBytes](https://developer.android.com/reference/java/lang/String.html#getBytes(java.lang.String)) - pub fn getBytes_String<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "getBytes", .descriptor == "(Ljava/lang/String;)[B" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "getBytes\0", "(Ljava/lang/String;)[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBytes](https://developer.android.com/reference/java/lang/String.html#getBytes(java.lang.String)) + pub fn getBytes_String<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "getBytes", .descriptor == "(Ljava/lang/String;)[B" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "getBytes\0", "(Ljava/lang/String;)[B\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getBytes](https://developer.android.com/reference/java/lang/String.html#getBytes()) - pub fn getBytes<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "getBytes", .descriptor == "()[B" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "getBytes\0", "()[B\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getBytes](https://developer.android.com/reference/java/lang/String.html#getBytes()) + pub fn getBytes<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ByteArray>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "getBytes", .descriptor == "()[B" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "getBytes\0", "()[B\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/java/lang/String.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env Object>>) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/java/lang/String.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "equals\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equalsIgnoreCase](https://developer.android.com/reference/java/lang/String.html#equalsIgnoreCase(java.lang.String)) - pub fn equalsIgnoreCase<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "equalsIgnoreCase", .descriptor == "(Ljava/lang/String;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "equalsIgnoreCase\0", "(Ljava/lang/String;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equalsIgnoreCase](https://developer.android.com/reference/java/lang/String.html#equalsIgnoreCase(java.lang.String)) + pub fn equalsIgnoreCase<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "equalsIgnoreCase", .descriptor == "(Ljava/lang/String;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "equalsIgnoreCase\0", + "(Ljava/lang/String;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [compareTo](https://developer.android.com/reference/java/lang/String.html#compareTo(java.lang.String)) - pub fn compareTo_String<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "compareTo", .descriptor == "(Ljava/lang/String;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "compareTo\0", "(Ljava/lang/String;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [compareTo](https://developer.android.com/reference/java/lang/String.html#compareTo(java.lang.String)) + pub fn compareTo_String<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "compareTo", .descriptor == "(Ljava/lang/String;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "compareTo\0", "(Ljava/lang/String;)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [compareToIgnoreCase](https://developer.android.com/reference/java/lang/String.html#compareToIgnoreCase(java.lang.String)) - pub fn compareToIgnoreCase<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "compareToIgnoreCase", .descriptor == "(Ljava/lang/String;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "compareToIgnoreCase\0", "(Ljava/lang/String;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [compareToIgnoreCase](https://developer.android.com/reference/java/lang/String.html#compareToIgnoreCase(java.lang.String)) + pub fn compareToIgnoreCase<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "compareToIgnoreCase", .descriptor == "(Ljava/lang/String;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "compareToIgnoreCase\0", + "(Ljava/lang/String;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [regionMatches](https://developer.android.com/reference/java/lang/String.html#regionMatches(int,%20java.lang.String,%20int,%20int)) - pub fn regionMatches_int_String_int_int<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg2: i32, arg3: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "regionMatches", .descriptor == "(ILjava/lang/String;II)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2), ::java_spaghetti::AsJValue::as_jvalue(&arg3)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "regionMatches\0", "(ILjava/lang/String;II)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [regionMatches](https://developer.android.com/reference/java/lang/String.html#regionMatches(int,%20java.lang.String,%20int,%20int)) + pub fn regionMatches_int_String_int_int<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + arg2: i32, + arg3: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "regionMatches", .descriptor == "(ILjava/lang/String;II)Z" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + arg1.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "regionMatches\0", + "(ILjava/lang/String;II)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [regionMatches](https://developer.android.com/reference/java/lang/String.html#regionMatches(boolean,%20int,%20java.lang.String,%20int,%20int)) - pub fn regionMatches_boolean_int_String_int_int<'env>(&'env self, arg0: bool, arg1: i32, arg2: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg3: i32, arg4: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "regionMatches", .descriptor == "(ZILjava/lang/String;II)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3), ::java_spaghetti::AsJValue::as_jvalue(&arg4)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "regionMatches\0", "(ZILjava/lang/String;II)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [regionMatches](https://developer.android.com/reference/java/lang/String.html#regionMatches(boolean,%20int,%20java.lang.String,%20int,%20int)) + pub fn regionMatches_boolean_int_String_int_int<'env>( + &'env self, + arg0: bool, + arg1: i32, + arg2: impl ::java_spaghetti::AsArg, + arg3: i32, + arg4: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "regionMatches", .descriptor == "(ZILjava/lang/String;II)Z" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + arg2.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg3), + ::java_spaghetti::AsJValue::as_jvalue(&arg4), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "regionMatches\0", + "(ZILjava/lang/String;II)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [startsWith](https://developer.android.com/reference/java/lang/String.html#startsWith(java.lang.String,%20int)) - pub fn startsWith_String_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg1: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "startsWith", .descriptor == "(Ljava/lang/String;I)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "startsWith\0", "(Ljava/lang/String;I)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [startsWith](https://developer.android.com/reference/java/lang/String.html#startsWith(java.lang.String,%20int)) + pub fn startsWith_String_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "startsWith", .descriptor == "(Ljava/lang/String;I)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "startsWith\0", + "(Ljava/lang/String;I)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [startsWith](https://developer.android.com/reference/java/lang/String.html#startsWith(java.lang.String)) - pub fn startsWith_String<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "startsWith", .descriptor == "(Ljava/lang/String;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "startsWith\0", "(Ljava/lang/String;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [startsWith](https://developer.android.com/reference/java/lang/String.html#startsWith(java.lang.String)) + pub fn startsWith_String<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "startsWith", .descriptor == "(Ljava/lang/String;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "startsWith\0", "(Ljava/lang/String;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [endsWith](https://developer.android.com/reference/java/lang/String.html#endsWith(java.lang.String)) - pub fn endsWith<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "endsWith", .descriptor == "(Ljava/lang/String;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "endsWith\0", "(Ljava/lang/String;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [endsWith](https://developer.android.com/reference/java/lang/String.html#endsWith(java.lang.String)) + pub fn endsWith<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "endsWith", .descriptor == "(Ljava/lang/String;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "endsWith\0", "(Ljava/lang/String;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/java/lang/String.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/java/lang/String.html#hashCode()) + pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [indexOf](https://developer.android.com/reference/java/lang/String.html#indexOf(int)) - pub fn indexOf_int<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "indexOf", .descriptor == "(I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "indexOf\0", "(I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [indexOf](https://developer.android.com/reference/java/lang/String.html#indexOf(int)) + pub fn indexOf_int<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "indexOf", .descriptor == "(I)I" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "indexOf\0", "(I)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [indexOf](https://developer.android.com/reference/java/lang/String.html#indexOf(int,%20int)) - pub fn indexOf_int_int<'env>(&'env self, arg0: i32, arg1: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "indexOf", .descriptor == "(II)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "indexOf\0", "(II)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [indexOf](https://developer.android.com/reference/java/lang/String.html#indexOf(int,%20int)) + pub fn indexOf_int_int<'env>( + &'env self, + arg0: i32, + arg1: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "indexOf", .descriptor == "(II)I" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "indexOf\0", "(II)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [lastIndexOf](https://developer.android.com/reference/java/lang/String.html#lastIndexOf(int)) - pub fn lastIndexOf_int<'env>(&'env self, arg0: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "lastIndexOf", .descriptor == "(I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "lastIndexOf\0", "(I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [lastIndexOf](https://developer.android.com/reference/java/lang/String.html#lastIndexOf(int)) + pub fn lastIndexOf_int<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "lastIndexOf", .descriptor == "(I)I" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "lastIndexOf\0", "(I)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [lastIndexOf](https://developer.android.com/reference/java/lang/String.html#lastIndexOf(int,%20int)) - pub fn lastIndexOf_int_int<'env>(&'env self, arg0: i32, arg1: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "lastIndexOf", .descriptor == "(II)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "lastIndexOf\0", "(II)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [lastIndexOf](https://developer.android.com/reference/java/lang/String.html#lastIndexOf(int,%20int)) + pub fn lastIndexOf_int_int<'env>( + &'env self, + arg0: i32, + arg1: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "lastIndexOf", .descriptor == "(II)I" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "lastIndexOf\0", "(II)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [indexOf](https://developer.android.com/reference/java/lang/String.html#indexOf(java.lang.String)) - pub fn indexOf_String<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "indexOf", .descriptor == "(Ljava/lang/String;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "indexOf\0", "(Ljava/lang/String;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [indexOf](https://developer.android.com/reference/java/lang/String.html#indexOf(java.lang.String)) + pub fn indexOf_String<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "indexOf", .descriptor == "(Ljava/lang/String;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "indexOf\0", "(Ljava/lang/String;)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } - - /// [indexOf](https://developer.android.com/reference/java/lang/String.html#indexOf(java.lang.String,%20int)) - pub fn indexOf_String_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg1: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "indexOf", .descriptor == "(Ljava/lang/String;I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "indexOf\0", "(Ljava/lang/String;I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + } + + /// [indexOf](https://developer.android.com/reference/java/lang/String.html#indexOf(java.lang.String,%20int)) + pub fn indexOf_String_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "indexOf", .descriptor == "(Ljava/lang/String;I)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "indexOf\0", "(Ljava/lang/String;I)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [lastIndexOf](https://developer.android.com/reference/java/lang/String.html#lastIndexOf(java.lang.String)) - pub fn lastIndexOf_String<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "lastIndexOf", .descriptor == "(Ljava/lang/String;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "lastIndexOf\0", "(Ljava/lang/String;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [lastIndexOf](https://developer.android.com/reference/java/lang/String.html#lastIndexOf(java.lang.String)) + pub fn lastIndexOf_String<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "lastIndexOf", .descriptor == "(Ljava/lang/String;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "lastIndexOf\0", + "(Ljava/lang/String;)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [lastIndexOf](https://developer.android.com/reference/java/lang/String.html#lastIndexOf(java.lang.String,%20int)) - pub fn lastIndexOf_String_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg1: i32) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "lastIndexOf", .descriptor == "(Ljava/lang/String;I)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "lastIndexOf\0", "(Ljava/lang/String;I)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [lastIndexOf](https://developer.android.com/reference/java/lang/String.html#lastIndexOf(java.lang.String,%20int)) + pub fn lastIndexOf_String_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "lastIndexOf", .descriptor == "(Ljava/lang/String;I)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "lastIndexOf\0", + "(Ljava/lang/String;I)I\0", + ); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [substring](https://developer.android.com/reference/java/lang/String.html#substring(int)) - pub fn substring_int<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "substring", .descriptor == "(I)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "substring\0", "(I)Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [substring](https://developer.android.com/reference/java/lang/String.html#substring(int)) + pub fn substring_int<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "substring", .descriptor == "(I)Ljava/lang/String;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "substring\0", "(I)Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [substring](https://developer.android.com/reference/java/lang/String.html#substring(int,%20int)) - pub fn substring_int_int<'env>(&'env self, arg0: i32, arg1: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "substring", .descriptor == "(II)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "substring\0", "(II)Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [substring](https://developer.android.com/reference/java/lang/String.html#substring(int,%20int)) + pub fn substring_int_int<'env>( + &'env self, + arg0: i32, + arg1: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "substring", .descriptor == "(II)Ljava/lang/String;" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "substring\0", "(II)Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [concat](https://developer.android.com/reference/java/lang/String.html#concat(java.lang.String)) - pub fn concat<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "concat", .descriptor == "(Ljava/lang/String;)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "concat\0", "(Ljava/lang/String;)Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [concat](https://developer.android.com/reference/java/lang/String.html#concat(java.lang.String)) + pub fn concat<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "concat", .descriptor == "(Ljava/lang/String;)Ljava/lang/String;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "concat\0", + "(Ljava/lang/String;)Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [replace](https://developer.android.com/reference/java/lang/String.html#replace(char,%20char)) - pub fn replace_char_char<'env>(&'env self, arg0: u16, arg1: u16) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "replace", .descriptor == "(CC)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "replace\0", "(CC)Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [replace](https://developer.android.com/reference/java/lang/String.html#replace(char,%20char)) + pub fn replace_char_char<'env>( + &'env self, + arg0: u16, + arg1: u16, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "replace", .descriptor == "(CC)Ljava/lang/String;" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "replace\0", "(CC)Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [matches](https://developer.android.com/reference/java/lang/String.html#matches(java.lang.String)) - pub fn matches<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "matches", .descriptor == "(Ljava/lang/String;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "matches\0", "(Ljava/lang/String;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [matches](https://developer.android.com/reference/java/lang/String.html#matches(java.lang.String)) + pub fn matches<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "matches", .descriptor == "(Ljava/lang/String;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "matches\0", "(Ljava/lang/String;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [replaceFirst](https://developer.android.com/reference/java/lang/String.html#replaceFirst(java.lang.String,%20java.lang.String)) - pub fn replaceFirst<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "replaceFirst", .descriptor == "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "replaceFirst\0", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [replaceFirst](https://developer.android.com/reference/java/lang/String.html#replaceFirst(java.lang.String,%20java.lang.String)) + pub fn replaceFirst<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "replaceFirst", .descriptor == "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "replaceFirst\0", + "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [replaceAll](https://developer.android.com/reference/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String)) - pub fn replaceAll<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "replaceAll", .descriptor == "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "replaceAll\0", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [replaceAll](https://developer.android.com/reference/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String)) + pub fn replaceAll<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "replaceAll", .descriptor == "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "replaceAll\0", + "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [split](https://developer.android.com/reference/java/lang/String.html#split(java.lang.String,%20int)) - pub fn split_String_int<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg1: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "split", .descriptor == "(Ljava/lang/String;I)[Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "split\0", "(Ljava/lang/String;I)[Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [split](https://developer.android.com/reference/java/lang/String.html#split(java.lang.String,%20int)) + pub fn split_String_int<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "split", .descriptor == "(Ljava/lang/String;I)[Ljava/lang/String;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "split\0", + "(Ljava/lang/String;I)[Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [split](https://developer.android.com/reference/java/lang/String.html#split(java.lang.String)) - pub fn split_String<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "split", .descriptor == "(Ljava/lang/String;)[Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "split\0", "(Ljava/lang/String;)[Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [split](https://developer.android.com/reference/java/lang/String.html#split(java.lang.String)) + pub fn split_String<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "split", .descriptor == "(Ljava/lang/String;)[Ljava/lang/String;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "split\0", + "(Ljava/lang/String;)[Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toLowerCase](https://developer.android.com/reference/java/lang/String.html#toLowerCase()) - pub fn toLowerCase<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "toLowerCase", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "toLowerCase\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toLowerCase](https://developer.android.com/reference/java/lang/String.html#toLowerCase()) + pub fn toLowerCase<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "toLowerCase", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "toLowerCase\0", "()Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toUpperCase](https://developer.android.com/reference/java/lang/String.html#toUpperCase()) - pub fn toUpperCase<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "toUpperCase", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "toUpperCase\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toUpperCase](https://developer.android.com/reference/java/lang/String.html#toUpperCase()) + pub fn toUpperCase<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "toUpperCase", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "toUpperCase\0", "()Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [trim](https://developer.android.com/reference/java/lang/String.html#trim()) - pub fn trim<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "trim", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "trim\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [trim](https://developer.android.com/reference/java/lang/String.html#trim()) + pub fn trim<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "trim", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "trim\0", "()Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [strip](https://developer.android.com/reference/java/lang/String.html#strip()) - pub fn strip<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "strip", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "strip\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [strip](https://developer.android.com/reference/java/lang/String.html#strip()) + pub fn strip<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "strip", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "strip\0", "()Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [stripLeading](https://developer.android.com/reference/java/lang/String.html#stripLeading()) - pub fn stripLeading<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "stripLeading", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "stripLeading\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [stripLeading](https://developer.android.com/reference/java/lang/String.html#stripLeading()) + pub fn stripLeading<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "stripLeading", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "stripLeading\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [stripTrailing](https://developer.android.com/reference/java/lang/String.html#stripTrailing()) - pub fn stripTrailing<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "stripTrailing", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "stripTrailing\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [stripTrailing](https://developer.android.com/reference/java/lang/String.html#stripTrailing()) + pub fn stripTrailing<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "stripTrailing", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/String\0", + "stripTrailing\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isBlank](https://developer.android.com/reference/java/lang/String.html#isBlank()) - pub fn isBlank<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "isBlank", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "isBlank\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isBlank](https://developer.android.com/reference/java/lang/String.html#isBlank()) + pub fn isBlank<'env>(&'env self) -> ::std::result::Result> { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "isBlank", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "isBlank\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/java/lang/String.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/java/lang/String.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "toString\0", "()Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toCharArray](https://developer.android.com/reference/java/lang/String.html#toCharArray()) - pub fn toCharArray<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::CharArray>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "toCharArray", .descriptor == "()[C" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "toCharArray\0", "()[C\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toCharArray](https://developer.android.com/reference/java/lang/String.html#toCharArray()) + pub fn toCharArray<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::CharArray>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "toCharArray", .descriptor == "()[C" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "toCharArray\0", "()[C\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [format](https://developer.android.com/reference/java/lang/String.html#format(java.lang.String,%20java.lang.Object...)) - pub fn format_String_Object_array<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ObjectArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC | VARARGS, .name == "format", .descriptor == "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "format\0", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [format](https://developer.android.com/reference/java/lang/String.html#format(java.lang.String,%20java.lang.Object...)) + pub fn format_String_Object_array<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg<::java_spaghetti::ObjectArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC | VARARGS, .name == "format", .descriptor == "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "format\0", + "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(java.lang.Object)) - pub fn valueOf_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(Ljava/lang/Object;)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "valueOf\0", "(Ljava/lang/Object;)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(java.lang.Object)) + pub fn valueOf_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(Ljava/lang/Object;)Ljava/lang/String;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "valueOf\0", + "(Ljava/lang/Object;)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(char%5B%5D)) - pub fn valueOf_char_array<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::CharArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "([C)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "valueOf\0", "([C)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(char%5B%5D)) + pub fn valueOf_char_array<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::CharArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "([C)Ljava/lang/String;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "valueOf\0", + "([C)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(char%5B%5D,%20int,%20int)) - pub fn valueOf_char_array_int_int<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::CharArray>>, arg1: i32, arg2: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "([CII)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "valueOf\0", "([CII)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(char%5B%5D,%20int,%20int)) + pub fn valueOf_char_array_int_int<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::CharArray>, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "([CII)Ljava/lang/String;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "valueOf\0", + "([CII)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [copyValueOf](https://developer.android.com/reference/java/lang/String.html#copyValueOf(char%5B%5D,%20int,%20int)) - pub fn copyValueOf_char_array_int_int<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::CharArray>>, arg1: i32, arg2: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "copyValueOf", .descriptor == "([CII)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1), ::java_spaghetti::AsJValue::as_jvalue(&arg2)]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "copyValueOf\0", "([CII)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [copyValueOf](https://developer.android.com/reference/java/lang/String.html#copyValueOf(char%5B%5D,%20int,%20int)) + pub fn copyValueOf_char_array_int_int<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::CharArray>, + arg1: i32, + arg2: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "copyValueOf", .descriptor == "([CII)Ljava/lang/String;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ::java_spaghetti::AsJValue::as_jvalue(&arg2), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "copyValueOf\0", + "([CII)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [copyValueOf](https://developer.android.com/reference/java/lang/String.html#copyValueOf(char%5B%5D)) - pub fn copyValueOf_char_array<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::CharArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "copyValueOf", .descriptor == "([C)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "copyValueOf\0", "([C)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [copyValueOf](https://developer.android.com/reference/java/lang/String.html#copyValueOf(char%5B%5D)) + pub fn copyValueOf_char_array<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::CharArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "copyValueOf", .descriptor == "([C)Ljava/lang/String;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "copyValueOf\0", + "([C)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(boolean)) - pub fn valueOf_boolean<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: bool) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(Z)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "valueOf\0", "(Z)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(boolean)) + pub fn valueOf_boolean<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: bool, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(Z)Ljava/lang/String;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "valueOf\0", + "(Z)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(char)) - pub fn valueOf_char<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: u16) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(C)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "valueOf\0", "(C)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(char)) + pub fn valueOf_char<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: u16, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(C)Ljava/lang/String;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "valueOf\0", + "(C)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(int)) - pub fn valueOf_int<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(I)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "valueOf\0", "(I)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(int)) + pub fn valueOf_int<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(I)Ljava/lang/String;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "valueOf\0", + "(I)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(long)) - pub fn valueOf_long<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: i64) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(J)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "valueOf\0", "(J)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(long)) + pub fn valueOf_long<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: i64, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(J)Ljava/lang/String;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "valueOf\0", + "(J)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(float)) - pub fn valueOf_float<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: f32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(F)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "valueOf\0", "(F)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(float)) + pub fn valueOf_float<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: f32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(F)Ljava/lang/String;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "valueOf\0", + "(F)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(double)) - pub fn valueOf_double<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: f64) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(D)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/lang/String\0", "valueOf\0", "(D)Ljava/lang/String;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [valueOf](https://developer.android.com/reference/java/lang/String.html#valueOf(double)) + pub fn valueOf_double<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: f64, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | STATIC, .name == "valueOf", .descriptor == "(D)Ljava/lang/String;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/lang/String\0", + "valueOf\0", + "(D)Ljava/lang/String;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [intern](https://developer.android.com/reference/java/lang/String.html#intern()) - pub fn intern<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "intern", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "intern\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [intern](https://developer.android.com/reference/java/lang/String.html#intern()) + pub fn intern<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC | NATIVE, .name == "intern", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "intern\0", "()Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [repeat](https://developer.android.com/reference/java/lang/String.html#repeat(int)) - pub fn repeat<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/String", java.flags == PUBLIC, .name == "repeat", .descriptor == "(I)Ljava/lang/String;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/String\0", "repeat\0", "(I)Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [repeat](https://developer.android.com/reference/java/lang/String.html#repeat(int)) + pub fn repeat<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/String", java.flags == PUBLIC, .name == "repeat", .descriptor == "(I)Ljava/lang/String;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/String\0", "repeat\0", "(I)Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public class [Throwable](https://developer.android.com/reference/java/lang/Throwable.html) - public class Throwable ("java/lang/Throwable\0") extends Object { + /// pub class [Throwable](https://developer.android.com/reference/java/lang/Throwable.html) + #[repr(transparent)] + pub struct Throwable(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for Throwable {} - /// [Throwable](https://developer.android.com/reference/java/lang/Throwable.html#Throwable()) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "", .descriptor == "()V" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "\0", "()V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for Throwable { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/lang/Throwable\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for Throwable {} + impl ::std::ops::Deref for Throwable { + type Target = Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl Throwable { + /// [Throwable](https://developer.android.com/reference/java/lang/Throwable.html#Throwable()) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "", .descriptor == "()V" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Throwable\0", "\0", "()V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [Throwable](https://developer.android.com/reference/java/lang/Throwable.html#Throwable(java.lang.String)) - pub fn new_String<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "\0", "(Ljava/lang/String;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [Throwable](https://developer.android.com/reference/java/lang/Throwable.html#Throwable(java.lang.String)) + pub fn new_String<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Throwable\0", "\0", "(Ljava/lang/String;)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [Throwable](https://developer.android.com/reference/java/lang/Throwable.html#Throwable(java.lang.String,%20java.lang.Throwable)) - pub fn new_String_Throwable<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env String>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env Throwable>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;Ljava/lang/Throwable;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "\0", "(Ljava/lang/String;Ljava/lang/Throwable;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [Throwable](https://developer.android.com/reference/java/lang/Throwable.html#Throwable(java.lang.String,%20java.lang.Throwable)) + pub fn new_String_Throwable<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/String;Ljava/lang/Throwable;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "\0", + "(Ljava/lang/String;Ljava/lang/Throwable;)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [Throwable](https://developer.android.com/reference/java/lang/Throwable.html#Throwable(java.lang.Throwable)) - pub fn new_Throwable<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env Throwable>>) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/Throwable;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "\0", "(Ljava/lang/Throwable;)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [Throwable](https://developer.android.com/reference/java/lang/Throwable.html#Throwable(java.lang.Throwable)) + pub fn new_Throwable<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, Throwable>> + { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "", .descriptor == "(Ljava/lang/Throwable;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "\0", + "(Ljava/lang/Throwable;)V\0", + ); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [getMessage](https://developer.android.com/reference/java/lang/Throwable.html#getMessage()) - pub fn getMessage<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "getMessage", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "getMessage\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getMessage](https://developer.android.com/reference/java/lang/Throwable.html#getMessage()) + pub fn getMessage<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "getMessage", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "getMessage\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getLocalizedMessage](https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage()) - pub fn getLocalizedMessage<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "getLocalizedMessage", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "getLocalizedMessage\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getLocalizedMessage](https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage()) + pub fn getLocalizedMessage<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "getLocalizedMessage", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "getLocalizedMessage\0", + "()Ljava/lang/String;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getCause](https://developer.android.com/reference/java/lang/Throwable.html#getCause()) - pub fn getCause<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Throwable>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC | SYNCRONIZED, .name == "getCause", .descriptor == "()Ljava/lang/Throwable;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "getCause\0", "()Ljava/lang/Throwable;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getCause](https://developer.android.com/reference/java/lang/Throwable.html#getCause()) + pub fn getCause<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Throwable>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/Throwable", java.flags == PUBLIC | SYNCRONIZED, .name == "getCause", .descriptor == "()Ljava/lang/Throwable;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "getCause\0", + "()Ljava/lang/Throwable;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [initCause](https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)) - pub fn initCause<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env Throwable>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Throwable>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC | SYNCRONIZED, .name == "initCause", .descriptor == "(Ljava/lang/Throwable;)Ljava/lang/Throwable;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "initCause\0", "(Ljava/lang/Throwable;)Ljava/lang/Throwable;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [initCause](https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)) + pub fn initCause<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Throwable>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/Throwable", java.flags == PUBLIC | SYNCRONIZED, .name == "initCause", .descriptor == "(Ljava/lang/Throwable;)Ljava/lang/Throwable;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "initCause\0", + "(Ljava/lang/Throwable;)Ljava/lang/Throwable;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/java/lang/Throwable.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, String>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/java/lang/Throwable.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, String>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Throwable\0", "toString\0", "()Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [printStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()) - pub fn printStackTrace<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "printStackTrace", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "printStackTrace\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [printStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()) + pub fn printStackTrace<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "printStackTrace", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/lang/Throwable\0", "printStackTrace\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [fillInStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()) - pub fn fillInStackTrace<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Throwable>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC | SYNCRONIZED, .name == "fillInStackTrace", .descriptor == "()Ljava/lang/Throwable;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "fillInStackTrace\0", "()Ljava/lang/Throwable;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [fillInStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()) + pub fn fillInStackTrace<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Throwable>>, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/Throwable", java.flags == PUBLIC | SYNCRONIZED, .name == "fillInStackTrace", .descriptor == "()Ljava/lang/Throwable;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "fillInStackTrace\0", + "()Ljava/lang/Throwable;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()) - pub fn getStackTrace<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "getStackTrace", .descriptor == "()[Ljava/lang/StackTraceElement;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "getStackTrace\0", "()[Ljava/lang/StackTraceElement;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()) + pub fn getStackTrace<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option< + ::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>, + >, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "getStackTrace", .descriptor == "()[Ljava/lang/StackTraceElement;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "getStackTrace\0", + "()[Ljava/lang/StackTraceElement;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement%5B%5D)) - pub fn setStackTrace<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ObjectArray>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "setStackTrace", .descriptor == "([Ljava/lang/StackTraceElement;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "setStackTrace\0", "([Ljava/lang/StackTraceElement;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement%5B%5D)) + pub fn setStackTrace<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ObjectArray>, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/Throwable", java.flags == PUBLIC, .name == "setStackTrace", .descriptor == "([Ljava/lang/StackTraceElement;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "setStackTrace\0", + "([Ljava/lang/StackTraceElement;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [addSuppressed](https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)) - pub fn addSuppressed<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env Throwable>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC | FINAL | SYNCRONIZED, .name == "addSuppressed", .descriptor == "(Ljava/lang/Throwable;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "addSuppressed\0", "(Ljava/lang/Throwable;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [addSuppressed](https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)) + pub fn addSuppressed<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, Throwable>> { + // class.path == "java/lang/Throwable", java.flags == PUBLIC | FINAL | SYNCRONIZED, .name == "addSuppressed", .descriptor == "(Ljava/lang/Throwable;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "addSuppressed\0", + "(Ljava/lang/Throwable;)V\0", + ); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getSuppressed](https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()) - pub fn getSuppressed<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, ::java_spaghetti::Local<'env, Throwable>> { - // class.path == "java/lang/Throwable", java.flags == PUBLIC | FINAL | SYNCRONIZED, .name == "getSuppressed", .descriptor == "()[Ljava/lang/Throwable;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/lang/Throwable\0", "getSuppressed\0", "()[Ljava/lang/Throwable;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getSuppressed](https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()) + pub fn getSuppressed<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option< + ::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>, + >, + ::java_spaghetti::Local<'env, Throwable>, + > { + // class.path == "java/lang/Throwable", java.flags == PUBLIC | FINAL | SYNCRONIZED, .name == "getSuppressed", .descriptor == "()[Ljava/lang/Throwable;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/lang/Throwable\0", + "getSuppressed\0", + "()[Ljava/lang/Throwable;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } } - pub mod util { - - ::java_spaghetti::class! { - /// public interface [Iterator](https://developer.android.com/reference/java/util/Iterator.html) - public interface Iterator ("java/util/Iterator\0") extends super::lang::Object { - - /// [hasNext](https://developer.android.com/reference/java/util/Iterator.html#hasNext()) - pub fn hasNext<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/Iterator", java.flags == PUBLIC | ABSTRACT, .name == "hasNext", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Iterator\0", "hasNext\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + pub mod util { + + /// pub interface [Iterator](https://developer.android.com/reference/java/util/Iterator.html) + #[repr(transparent)] + pub struct Iterator(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for Iterator {} + + unsafe impl ::java_spaghetti::JniType for Iterator { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/util/Iterator\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for Iterator {} + impl ::std::ops::Deref for Iterator { + type Target = super::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl Iterator { + /// [hasNext](https://developer.android.com/reference/java/util/Iterator.html#hasNext()) + pub fn hasNext<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/Iterator", java.flags == PUBLIC | ABSTRACT, .name == "hasNext", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Iterator\0", "hasNext\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [next](https://developer.android.com/reference/java/util/Iterator.html#next()) - pub fn next<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Iterator", java.flags == PUBLIC | ABSTRACT, .name == "next", .descriptor == "()Ljava/lang/Object;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Iterator\0", "next\0", "()Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [next](https://developer.android.com/reference/java/util/Iterator.html#next()) + pub fn next<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Iterator", java.flags == PUBLIC | ABSTRACT, .name == "next", .descriptor == "()Ljava/lang/Object;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Iterator\0", "next\0", "()Ljava/lang/Object;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [remove](https://developer.android.com/reference/java/util/Iterator.html#remove()) - pub fn remove<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Iterator", java.flags == PUBLIC, .name == "remove", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Iterator\0", "remove\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [remove](https://developer.android.com/reference/java/util/Iterator.html#remove()) + pub fn remove<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/util/Iterator", java.flags == PUBLIC, .name == "remove", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Iterator\0", "remove\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public interface [List](https://developer.android.com/reference/java/util/List.html) - public interface List ("java/util/List\0") extends super::lang::Object { + /// pub interface [List](https://developer.android.com/reference/java/util/List.html) + #[repr(transparent)] + pub struct List(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for List {} - /// [size](https://developer.android.com/reference/java/util/List.html#size()) - pub fn size<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "size", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "size\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for List { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/util/List\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for List {} + impl ::std::ops::Deref for List { + type Target = super::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl List { + /// [size](https://developer.android.com/reference/java/util/List.html#size()) + pub fn size<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "size", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "size\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isEmpty](https://developer.android.com/reference/java/util/List.html#isEmpty()) - pub fn isEmpty<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "isEmpty", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "isEmpty\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isEmpty](https://developer.android.com/reference/java/util/List.html#isEmpty()) + pub fn isEmpty<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "isEmpty", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "isEmpty\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [contains](https://developer.android.com/reference/java/util/List.html#contains(java.lang.Object)) - pub fn contains<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "contains", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "contains\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [contains](https://developer.android.com/reference/java/util/List.html#contains(java.lang.Object)) + pub fn contains<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "contains", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "contains\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [iterator](https://developer.android.com/reference/java/util/List.html#iterator()) - pub fn iterator<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Iterator>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "iterator", .descriptor == "()Ljava/util/Iterator;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "iterator\0", "()Ljava/util/Iterator;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [iterator](https://developer.android.com/reference/java/util/List.html#iterator()) + pub fn iterator<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Iterator>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "iterator", .descriptor == "()Ljava/util/Iterator;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "iterator\0", "()Ljava/util/Iterator;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toArray](https://developer.android.com/reference/java/util/List.html#toArray()) - pub fn toArray<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "toArray", .descriptor == "()[Ljava/lang/Object;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "toArray\0", "()[Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toArray](https://developer.android.com/reference/java/util/List.html#toArray()) + pub fn toArray<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option< + ::java_spaghetti::Local< + 'env, + ::java_spaghetti::ObjectArray, + >, + >, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "toArray", .descriptor == "()[Ljava/lang/Object;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "toArray\0", "()[Ljava/lang/Object;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toArray](https://developer.android.com/reference/java/util/List.html#toArray(java.lang.Object%5B%5D)) - pub fn toArray_Object_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ObjectArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "toArray", .descriptor == "([Ljava/lang/Object;)[Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "toArray\0", "([Ljava/lang/Object;)[Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toArray](https://developer.android.com/reference/java/util/List.html#toArray(java.lang.Object%5B%5D)) + pub fn toArray_Object_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg< + ::java_spaghetti::ObjectArray, + >, + ) -> ::std::result::Result< + ::std::option::Option< + ::java_spaghetti::Local< + 'env, + ::java_spaghetti::ObjectArray, + >, + >, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "toArray", .descriptor == "([Ljava/lang/Object;)[Ljava/lang/Object;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/List\0", + "toArray\0", + "([Ljava/lang/Object;)[Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [add](https://developer.android.com/reference/java/util/List.html#add(java.lang.Object)) - pub fn add_Object<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "add", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "add\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [add](https://developer.android.com/reference/java/util/List.html#add(java.lang.Object)) + pub fn add_Object<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "add", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "add\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [remove](https://developer.android.com/reference/java/util/List.html#remove(java.lang.Object)) - pub fn remove_Object<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "remove", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "remove\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [remove](https://developer.android.com/reference/java/util/List.html#remove(java.lang.Object)) + pub fn remove_Object<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "remove", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "remove\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [clear](https://developer.android.com/reference/java/util/List.html#clear()) - pub fn clear<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "clear", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "clear\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [clear](https://developer.android.com/reference/java/util/List.html#clear()) + pub fn clear<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "clear", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "clear\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/java/util/List.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/java/util/List.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "equals\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/java/util/List.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/java/util/List.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [get](https://developer.android.com/reference/java/util/List.html#get(int)) - pub fn get<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "get", .descriptor == "(I)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "get\0", "(I)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [get](https://developer.android.com/reference/java/util/List.html#get(int)) + pub fn get<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "get", .descriptor == "(I)Ljava/lang/Object;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "get\0", "(I)Ljava/lang/Object;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [set](https://developer.android.com/reference/java/util/List.html#set(int,%20java.lang.Object)) - pub fn set<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "set", .descriptor == "(ILjava/lang/Object;)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "set\0", "(ILjava/lang/Object;)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [set](https://developer.android.com/reference/java/util/List.html#set(int,%20java.lang.Object)) + pub fn set<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "set", .descriptor == "(ILjava/lang/Object;)Ljava/lang/Object;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/List\0", + "set\0", + "(ILjava/lang/Object;)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [add](https://developer.android.com/reference/java/util/List.html#add(int,%20java.lang.Object)) - pub fn add_int_Object<'env>(&'env self, arg0: i32, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "add", .descriptor == "(ILjava/lang/Object;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "add\0", "(ILjava/lang/Object;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [add](https://developer.android.com/reference/java/util/List.html#add(int,%20java.lang.Object)) + pub fn add_int_Object<'env>( + &'env self, + arg0: i32, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "add", .descriptor == "(ILjava/lang/Object;)V" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "add\0", "(ILjava/lang/Object;)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [remove](https://developer.android.com/reference/java/util/List.html#remove(int)) - pub fn remove_int<'env>(&'env self, arg0: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "remove", .descriptor == "(I)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "remove\0", "(I)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [remove](https://developer.android.com/reference/java/util/List.html#remove(int)) + pub fn remove_int<'env>( + &'env self, + arg0: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "remove", .descriptor == "(I)Ljava/lang/Object;" + unsafe { + let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0)]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "remove\0", "(I)Ljava/lang/Object;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [indexOf](https://developer.android.com/reference/java/util/List.html#indexOf(java.lang.Object)) - pub fn indexOf<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "indexOf", .descriptor == "(Ljava/lang/Object;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "indexOf\0", "(Ljava/lang/Object;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [indexOf](https://developer.android.com/reference/java/util/List.html#indexOf(java.lang.Object)) + pub fn indexOf<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "indexOf", .descriptor == "(Ljava/lang/Object;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "indexOf\0", "(Ljava/lang/Object;)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [lastIndexOf](https://developer.android.com/reference/java/util/List.html#lastIndexOf(java.lang.Object)) - pub fn lastIndexOf<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "lastIndexOf", .descriptor == "(Ljava/lang/Object;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "lastIndexOf\0", "(Ljava/lang/Object;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [lastIndexOf](https://developer.android.com/reference/java/util/List.html#lastIndexOf(java.lang.Object)) + pub fn lastIndexOf<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "lastIndexOf", .descriptor == "(Ljava/lang/Object;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "lastIndexOf\0", "(Ljava/lang/Object;)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [subList](https://developer.android.com/reference/java/util/List.html#subList(int,%20int)) - pub fn subList<'env>(&'env self, arg0: i32, arg1: i32) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "subList", .descriptor == "(II)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/List\0", "subList\0", "(II)Ljava/util/List;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [subList](https://developer.android.com/reference/java/util/List.html#subList(int,%20int)) + pub fn subList<'env>( + &'env self, + arg0: i32, + arg1: i32, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | ABSTRACT, .name == "subList", .descriptor == "(II)Ljava/util/List;" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/List\0", "subList\0", "(II)Ljava/util/List;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of()) - pub fn of<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "()Ljava/util/List;" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "()Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of()) + pub fn of<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "()Ljava/util/List;" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_static_method("java/util/List\0", "of\0", "()Ljava/util/List;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object)) - pub fn of_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object)) + pub fn of_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/List\0", + "of\0", + "(Ljava/lang/Object;)Ljava/util/List;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/List\0", + "of\0", + "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue(), arg2.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/List\0", + "of\0", + "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/List\0", + "of\0", + "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg9: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg9.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + arg9: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + arg9.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object...)) - pub fn of_Object_array<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ObjectArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, List>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/List", java.flags == PUBLIC | STATIC | VARARGS, .name == "of", .descriptor == "([Ljava/lang/Object;)Ljava/util/List;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/List\0", "of\0", "([Ljava/lang/Object;)Ljava/util/List;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/List.html#of(java.lang.Object...)) + pub fn of_Object_array<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg< + ::java_spaghetti::ObjectArray, + >, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, List>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/List", java.flags == PUBLIC | STATIC | VARARGS, .name == "of", .descriptor == "([Ljava/lang/Object;)Ljava/util/List;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/List\0", + "of\0", + "([Ljava/lang/Object;)Ljava/util/List;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public interface [Map](https://developer.android.com/reference/java/util/Map.html) - public interface Map ("java/util/Map\0") extends super::lang::Object { + /// pub interface [Map](https://developer.android.com/reference/java/util/Map.html) + #[repr(transparent)] + pub struct Map(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for Map {} - /// [size](https://developer.android.com/reference/java/util/Map.html#size()) - pub fn size<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "size", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "size\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for Map { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/util/Map\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for Map {} + impl ::std::ops::Deref for Map { + type Target = super::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl Map { + /// [size](https://developer.android.com/reference/java/util/Map.html#size()) + pub fn size<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "size", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "size\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isEmpty](https://developer.android.com/reference/java/util/Map.html#isEmpty()) - pub fn isEmpty<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "isEmpty", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "isEmpty\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isEmpty](https://developer.android.com/reference/java/util/Map.html#isEmpty()) + pub fn isEmpty<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "isEmpty", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "isEmpty\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [containsKey](https://developer.android.com/reference/java/util/Map.html#containsKey(java.lang.Object)) - pub fn containsKey<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "containsKey", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "containsKey\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [containsKey](https://developer.android.com/reference/java/util/Map.html#containsKey(java.lang.Object)) + pub fn containsKey<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "containsKey", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "containsKey\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [containsValue](https://developer.android.com/reference/java/util/Map.html#containsValue(java.lang.Object)) - pub fn containsValue<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "containsValue", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "containsValue\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [containsValue](https://developer.android.com/reference/java/util/Map.html#containsValue(java.lang.Object)) + pub fn containsValue<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "containsValue", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "containsValue\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [get](https://developer.android.com/reference/java/util/Map.html#get(java.lang.Object)) - pub fn get<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "get", .descriptor == "(Ljava/lang/Object;)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "get\0", "(Ljava/lang/Object;)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [get](https://developer.android.com/reference/java/util/Map.html#get(java.lang.Object)) + pub fn get<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "get", .descriptor == "(Ljava/lang/Object;)Ljava/lang/Object;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Map\0", + "get\0", + "(Ljava/lang/Object;)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [put](https://developer.android.com/reference/java/util/Map.html#put(java.lang.Object,%20java.lang.Object)) - pub fn put<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "put", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "put\0", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [put](https://developer.android.com/reference/java/util/Map.html#put(java.lang.Object,%20java.lang.Object)) + pub fn put<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "put", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Map\0", + "put\0", + "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [remove](https://developer.android.com/reference/java/util/Map.html#remove(java.lang.Object)) - pub fn remove_Object<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "remove", .descriptor == "(Ljava/lang/Object;)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "remove\0", "(Ljava/lang/Object;)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [remove](https://developer.android.com/reference/java/util/Map.html#remove(java.lang.Object)) + pub fn remove_Object<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "remove", .descriptor == "(Ljava/lang/Object;)Ljava/lang/Object;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Map\0", + "remove\0", + "(Ljava/lang/Object;)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [putAll](https://developer.android.com/reference/java/util/Map.html#putAll(java.util.Map)) - pub fn putAll<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env Map>>) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "putAll", .descriptor == "(Ljava/util/Map;)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "putAll\0", "(Ljava/util/Map;)V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [putAll](https://developer.android.com/reference/java/util/Map.html#putAll(java.util.Map)) + pub fn putAll<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "putAll", .descriptor == "(Ljava/util/Map;)V" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "putAll\0", "(Ljava/util/Map;)V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [clear](https://developer.android.com/reference/java/util/Map.html#clear()) - pub fn clear<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "clear", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "clear\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [clear](https://developer.android.com/reference/java/util/Map.html#clear()) + pub fn clear<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "clear", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "clear\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [keySet](https://developer.android.com/reference/java/util/Map.html#keySet()) - pub fn keySet<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "keySet", .descriptor == "()Ljava/util/Set;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "keySet\0", "()Ljava/util/Set;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [keySet](https://developer.android.com/reference/java/util/Map.html#keySet()) + pub fn keySet<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "keySet", .descriptor == "()Ljava/util/Set;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "keySet\0", "()Ljava/util/Set;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [entrySet](https://developer.android.com/reference/java/util/Map.html#entrySet()) - pub fn entrySet<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "entrySet", .descriptor == "()Ljava/util/Set;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "entrySet\0", "()Ljava/util/Set;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [entrySet](https://developer.android.com/reference/java/util/Map.html#entrySet()) + pub fn entrySet<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "entrySet", .descriptor == "()Ljava/util/Set;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "entrySet\0", "()Ljava/util/Set;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/java/util/Map.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/java/util/Map.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "equals\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/java/util/Map.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/java/util/Map.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/Map", java.flags == PUBLIC | ABSTRACT, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getOrDefault](https://developer.android.com/reference/java/util/Map.html#getOrDefault(java.lang.Object,%20java.lang.Object)) - pub fn getOrDefault<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC, .name == "getOrDefault", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "getOrDefault\0", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getOrDefault](https://developer.android.com/reference/java/util/Map.html#getOrDefault(java.lang.Object,%20java.lang.Object)) + pub fn getOrDefault<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC, .name == "getOrDefault", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Map\0", + "getOrDefault\0", + "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [putIfAbsent](https://developer.android.com/reference/java/util/Map.html#putIfAbsent(java.lang.Object,%20java.lang.Object)) - pub fn putIfAbsent<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC, .name == "putIfAbsent", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "putIfAbsent\0", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [putIfAbsent](https://developer.android.com/reference/java/util/Map.html#putIfAbsent(java.lang.Object,%20java.lang.Object)) + pub fn putIfAbsent<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC, .name == "putIfAbsent", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Map\0", + "putIfAbsent\0", + "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [remove](https://developer.android.com/reference/java/util/Map.html#remove(java.lang.Object,%20java.lang.Object)) - pub fn remove_Object_Object<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Map", java.flags == PUBLIC, .name == "remove", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "remove\0", "(Ljava/lang/Object;Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [remove](https://developer.android.com/reference/java/util/Map.html#remove(java.lang.Object,%20java.lang.Object)) + pub fn remove_Object_Object<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Map", java.flags == PUBLIC, .name == "remove", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Map\0", + "remove\0", + "(Ljava/lang/Object;Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [replace](https://developer.android.com/reference/java/util/Map.html#replace(java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn replace_Object_Object_Object<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Map", java.flags == PUBLIC, .name == "replace", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "replace\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [replace](https://developer.android.com/reference/java/util/Map.html#replace(java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn replace_Object_Object_Object<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Map", java.flags == PUBLIC, .name == "replace", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue(), arg2.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Map\0", + "replace\0", + "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z\0", + ); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [replace](https://developer.android.com/reference/java/util/Map.html#replace(java.lang.Object,%20java.lang.Object)) - pub fn replace_Object_Object<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC, .name == "replace", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map\0", "replace\0", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [replace](https://developer.android.com/reference/java/util/Map.html#replace(java.lang.Object,%20java.lang.Object)) + pub fn replace_Object_Object<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC, .name == "replace", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Map\0", + "replace\0", + "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of()) - pub fn of<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "()Ljava/util/Map;" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "()Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of()) + pub fn of<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "()Ljava/util/Map;" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_static_method("java/util/Map\0", "of\0", "()Ljava/util/Map;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Map\0", + "of\0", + "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Map\0", + "of\0", + "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg9: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg9.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + arg9: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + arg9.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg9: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg10: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg11: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg9.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg10.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg11.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + arg9: impl ::java_spaghetti::AsArg, + arg10: impl ::java_spaghetti::AsArg, + arg11: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + arg9.as_arg_jvalue(), + arg10.as_arg_jvalue(), + arg11.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg9: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg10: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg11: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg12: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg13: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg9.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg10.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg11.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg12.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg13.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object< + 'env, + >( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + arg9: impl ::java_spaghetti::AsArg, + arg10: impl ::java_spaghetti::AsArg, + arg11: impl ::java_spaghetti::AsArg, + arg12: impl ::java_spaghetti::AsArg, + arg13: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + arg9.as_arg_jvalue(), + arg10.as_arg_jvalue(), + arg11.as_arg_jvalue(), + arg12.as_arg_jvalue(), + arg13.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg9: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg10: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg11: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg12: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg13: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg14: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg15: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg9.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg10.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg11.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg12.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg13.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg14.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg15.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object< + 'env, + >( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + arg9: impl ::java_spaghetti::AsArg, + arg10: impl ::java_spaghetti::AsArg, + arg11: impl ::java_spaghetti::AsArg, + arg12: impl ::java_spaghetti::AsArg, + arg13: impl ::java_spaghetti::AsArg, + arg14: impl ::java_spaghetti::AsArg, + arg15: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + arg9.as_arg_jvalue(), + arg10.as_arg_jvalue(), + arg11.as_arg_jvalue(), + arg12.as_arg_jvalue(), + arg13.as_arg_jvalue(), + arg14.as_arg_jvalue(), + arg15.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg9: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg10: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg11: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg12: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg13: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg14: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg15: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg16: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg17: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg9.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg10.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg11.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg12.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg13.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg14.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg15.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg16.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg17.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object< + 'env, + >( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + arg9: impl ::java_spaghetti::AsArg, + arg10: impl ::java_spaghetti::AsArg, + arg11: impl ::java_spaghetti::AsArg, + arg12: impl ::java_spaghetti::AsArg, + arg13: impl ::java_spaghetti::AsArg, + arg14: impl ::java_spaghetti::AsArg, + arg15: impl ::java_spaghetti::AsArg, + arg16: impl ::java_spaghetti::AsArg, + arg17: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + arg9.as_arg_jvalue(), + arg10.as_arg_jvalue(), + arg11.as_arg_jvalue(), + arg12.as_arg_jvalue(), + arg13.as_arg_jvalue(), + arg14.as_arg_jvalue(), + arg15.as_arg_jvalue(), + arg16.as_arg_jvalue(), + arg17.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg9: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg10: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg11: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg12: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg13: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg14: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg15: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg16: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg17: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg18: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg19: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg9.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg10.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg11.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg12.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg13.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg14.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg15.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg16.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg17.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg18.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg19.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Map.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object< + 'env, + >( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + arg9: impl ::java_spaghetti::AsArg, + arg10: impl ::java_spaghetti::AsArg, + arg11: impl ::java_spaghetti::AsArg, + arg12: impl ::java_spaghetti::AsArg, + arg13: impl ::java_spaghetti::AsArg, + arg14: impl ::java_spaghetti::AsArg, + arg15: impl ::java_spaghetti::AsArg, + arg16: impl ::java_spaghetti::AsArg, + arg17: impl ::java_spaghetti::AsArg, + arg18: impl ::java_spaghetti::AsArg, + arg19: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + arg9.as_arg_jvalue(), + arg10.as_arg_jvalue(), + arg11.as_arg_jvalue(), + arg12.as_arg_jvalue(), + arg13.as_arg_jvalue(), + arg14.as_arg_jvalue(), + arg15.as_arg_jvalue(), + arg16.as_arg_jvalue(), + arg17.as_arg_jvalue(), + arg18.as_arg_jvalue(), + arg19.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [ofEntries](https://developer.android.com/reference/java/util/Map.html#ofEntries(java.util.Map.Entry...)) - pub fn ofEntries<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ObjectArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC | VARARGS, .name == "ofEntries", .descriptor == "([Ljava/util/Map$Entry;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "ofEntries\0", "([Ljava/util/Map$Entry;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [ofEntries](https://developer.android.com/reference/java/util/Map.html#ofEntries(java.util.Map.Entry...)) + pub fn ofEntries<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ObjectArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC | VARARGS, .name == "ofEntries", .descriptor == "([Ljava/util/Map$Entry;)Ljava/util/Map;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Map\0", + "ofEntries\0", + "([Ljava/util/Map$Entry;)Ljava/util/Map;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [entry](https://developer.android.com/reference/java/util/Map.html#entry(java.lang.Object,%20java.lang.Object)) - pub fn entry<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map_Entry>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "entry", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map$Entry;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "entry\0", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map$Entry;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [entry](https://developer.android.com/reference/java/util/Map.html#entry(java.lang.Object,%20java.lang.Object)) + pub fn entry<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map_Entry>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "entry", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map$Entry;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Map\0", + "entry\0", + "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map$Entry;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [copyOf](https://developer.android.com/reference/java/util/Map.html#copyOf(java.util.Map)) - pub fn copyOf<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env Map>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Map>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "copyOf", .descriptor == "(Ljava/util/Map;)Ljava/util/Map;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Map\0", "copyOf\0", "(Ljava/util/Map;)Ljava/util/Map;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [copyOf](https://developer.android.com/reference/java/util/Map.html#copyOf(java.util.Map)) + pub fn copyOf<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Map>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map", java.flags == PUBLIC | STATIC, .name == "copyOf", .descriptor == "(Ljava/util/Map;)Ljava/util/Map;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Map\0", + "copyOf\0", + "(Ljava/util/Map;)Ljava/util/Map;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public interface [Map.Entry](https://developer.android.com/reference/java/util/Map.Entry.html) - public interface Map_Entry ("java/util/Map$Entry\0") extends super::lang::Object { + /// pub interface [Map.Entry](https://developer.android.com/reference/java/util/Map.Entry.html) + #[repr(transparent)] + pub struct Map_Entry(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for Map_Entry {} - /// [getKey](https://developer.android.com/reference/java/util/Map.Entry.html#getKey()) - pub fn getKey<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "getKey", .descriptor == "()Ljava/lang/Object;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map$Entry\0", "getKey\0", "()Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for Map_Entry { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/util/Map$Entry\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for Map_Entry {} + impl ::std::ops::Deref for Map_Entry { + type Target = super::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl Map_Entry { + /// [getKey](https://developer.android.com/reference/java/util/Map.Entry.html#getKey()) + pub fn getKey<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "getKey", .descriptor == "()Ljava/lang/Object;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map$Entry\0", "getKey\0", "()Ljava/lang/Object;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getValue](https://developer.android.com/reference/java/util/Map.Entry.html#getValue()) - pub fn getValue<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "getValue", .descriptor == "()Ljava/lang/Object;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map$Entry\0", "getValue\0", "()Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getValue](https://developer.android.com/reference/java/util/Map.Entry.html#getValue()) + pub fn getValue<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "getValue", .descriptor == "()Ljava/lang/Object;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map$Entry\0", "getValue\0", "()Ljava/lang/Object;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [setValue](https://developer.android.com/reference/java/util/Map.Entry.html#setValue(java.lang.Object)) - pub fn setValue<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "setValue", .descriptor == "(Ljava/lang/Object;)Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map$Entry\0", "setValue\0", "(Ljava/lang/Object;)Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [setValue](https://developer.android.com/reference/java/util/Map.Entry.html#setValue(java.lang.Object)) + pub fn setValue<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::Object>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "setValue", .descriptor == "(Ljava/lang/Object;)Ljava/lang/Object;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Map$Entry\0", + "setValue\0", + "(Ljava/lang/Object;)Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/java/util/Map.Entry.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map$Entry\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/java/util/Map.Entry.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map$Entry\0", "equals\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/java/util/Map.Entry.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Map$Entry\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/java/util/Map.Entry.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/Map$Entry", java.flags == PUBLIC | ABSTRACT, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Map$Entry\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public interface [Set](https://developer.android.com/reference/java/util/Set.html) - public interface Set ("java/util/Set\0") extends super::lang::Object { + /// pub interface [Set](https://developer.android.com/reference/java/util/Set.html) + #[repr(transparent)] + pub struct Set(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for Set {} - /// [size](https://developer.android.com/reference/java/util/Set.html#size()) - pub fn size<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "size", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "size\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for Set { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/util/Set\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for Set {} + impl ::std::ops::Deref for Set { + type Target = super::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl Set { + /// [size](https://developer.android.com/reference/java/util/Set.html#size()) + pub fn size<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "size", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "size\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [isEmpty](https://developer.android.com/reference/java/util/Set.html#isEmpty()) - pub fn isEmpty<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "isEmpty", .descriptor == "()Z" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "isEmpty\0", "()Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [isEmpty](https://developer.android.com/reference/java/util/Set.html#isEmpty()) + pub fn isEmpty<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "isEmpty", .descriptor == "()Z" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "isEmpty\0", "()Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [contains](https://developer.android.com/reference/java/util/Set.html#contains(java.lang.Object)) - pub fn contains<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "contains", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "contains\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [contains](https://developer.android.com/reference/java/util/Set.html#contains(java.lang.Object)) + pub fn contains<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "contains", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "contains\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [iterator](https://developer.android.com/reference/java/util/Set.html#iterator()) - pub fn iterator<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Iterator>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "iterator", .descriptor == "()Ljava/util/Iterator;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "iterator\0", "()Ljava/util/Iterator;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [iterator](https://developer.android.com/reference/java/util/Set.html#iterator()) + pub fn iterator<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Iterator>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "iterator", .descriptor == "()Ljava/util/Iterator;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "iterator\0", "()Ljava/util/Iterator;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toArray](https://developer.android.com/reference/java/util/Set.html#toArray()) - pub fn toArray<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "toArray", .descriptor == "()[Ljava/lang/Object;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "toArray\0", "()[Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toArray](https://developer.android.com/reference/java/util/Set.html#toArray()) + pub fn toArray<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option< + ::java_spaghetti::Local< + 'env, + ::java_spaghetti::ObjectArray, + >, + >, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "toArray", .descriptor == "()[Ljava/lang/Object;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "toArray\0", "()[Ljava/lang/Object;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toArray](https://developer.android.com/reference/java/util/Set.html#toArray(java.lang.Object%5B%5D)) - pub fn toArray_Object_array<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ObjectArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, ::java_spaghetti::ObjectArray>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "toArray", .descriptor == "([Ljava/lang/Object;)[Ljava/lang/Object;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "toArray\0", "([Ljava/lang/Object;)[Ljava/lang/Object;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toArray](https://developer.android.com/reference/java/util/Set.html#toArray(java.lang.Object%5B%5D)) + pub fn toArray_Object_array<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg< + ::java_spaghetti::ObjectArray, + >, + ) -> ::std::result::Result< + ::std::option::Option< + ::java_spaghetti::Local< + 'env, + ::java_spaghetti::ObjectArray, + >, + >, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "toArray", .descriptor == "([Ljava/lang/Object;)[Ljava/lang/Object;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = __jni_env.require_class_method( + "java/util/Set\0", + "toArray\0", + "([Ljava/lang/Object;)[Ljava/lang/Object;\0", + ); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [add](https://developer.android.com/reference/java/util/Set.html#add(java.lang.Object)) - pub fn add<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "add", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "add\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [add](https://developer.android.com/reference/java/util/Set.html#add(java.lang.Object)) + pub fn add<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "add", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "add\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [remove](https://developer.android.com/reference/java/util/Set.html#remove(java.lang.Object)) - pub fn remove<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "remove", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "remove\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [remove](https://developer.android.com/reference/java/util/Set.html#remove(java.lang.Object)) + pub fn remove<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "remove", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "remove\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [clear](https://developer.android.com/reference/java/util/Set.html#clear()) - pub fn clear<'env>(&'env self) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "clear", .descriptor == "()V" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "clear\0", "()V\0"); - __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [clear](https://developer.android.com/reference/java/util/Set.html#clear()) + pub fn clear<'env>( + &'env self, + ) -> ::std::result::Result<(), ::java_spaghetti::Local<'env, super::lang::Throwable>> { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "clear", .descriptor == "()V" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "clear\0", "()V\0"); + __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/java/util/Set.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/java/util/Set.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "equals\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/java/util/Set.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/Set\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/java/util/Set.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/Set", java.flags == PUBLIC | ABSTRACT, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/Set\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of()) - pub fn of<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "()Ljava/util/Set;" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "()Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of()) + pub fn of<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "()Ljava/util/Set;" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = + __jni_env.require_class_static_method("java/util/Set\0", "of\0", "()Ljava/util/Set;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object)) - pub fn of_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object)) + pub fn of_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Set\0", + "of\0", + "(Ljava/lang/Object;)Ljava/util/Set;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Set\0", + "of\0", + "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue(), arg1.as_arg_jvalue(), arg2.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Set\0", + "of\0", + "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Set\0", + "of\0", + "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) - pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg1: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg2: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg3: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg4: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg5: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg6: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg7: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg8: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>, arg9: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg1.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg2.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg3.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg4.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg5.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg6.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg7.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg8.into()), ::java_spaghetti::AsJValue::as_jvalue(&arg9.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object,%20java.lang.Object)) + pub fn of_Object_Object_Object_Object_Object_Object_Object_Object_Object_Object<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + arg1: impl ::java_spaghetti::AsArg, + arg2: impl ::java_spaghetti::AsArg, + arg3: impl ::java_spaghetti::AsArg, + arg4: impl ::java_spaghetti::AsArg, + arg5: impl ::java_spaghetti::AsArg, + arg6: impl ::java_spaghetti::AsArg, + arg7: impl ::java_spaghetti::AsArg, + arg8: impl ::java_spaghetti::AsArg, + arg9: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC, .name == "of", .descriptor == "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [ + arg0.as_arg_jvalue(), + arg1.as_arg_jvalue(), + arg2.as_arg_jvalue(), + arg3.as_arg_jvalue(), + arg4.as_arg_jvalue(), + arg5.as_arg_jvalue(), + arg6.as_arg_jvalue(), + arg7.as_arg_jvalue(), + arg8.as_arg_jvalue(), + arg9.as_arg_jvalue(), + ]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;\0"); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object...)) - pub fn of_Object_array<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ObjectArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, Set>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/Set", java.flags == PUBLIC | STATIC | VARARGS, .name == "of", .descriptor == "([Ljava/lang/Object;)Ljava/util/Set;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/Set\0", "of\0", "([Ljava/lang/Object;)Ljava/util/Set;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [of](https://developer.android.com/reference/java/util/Set.html#of(java.lang.Object...)) + pub fn of_Object_array<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg< + ::java_spaghetti::ObjectArray, + >, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, Set>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/Set", java.flags == PUBLIC | STATIC | VARARGS, .name == "of", .descriptor == "([Ljava/lang/Object;)Ljava/util/Set;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/Set\0", + "of\0", + "([Ljava/lang/Object;)Ljava/util/Set;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } } } - ::java_spaghetti::class! { - /// public final class [UUID](https://developer.android.com/reference/java/util/UUID.html) - public final class UUID ("java/util/UUID\0") extends super::lang::Object { + /// pub final class [UUID](https://developer.android.com/reference/java/util/UUID.html) + #[repr(transparent)] + pub struct UUID(pub(crate) ::java_spaghetti::ObjectAndEnv); + unsafe impl ::java_spaghetti::ReferenceType for UUID {} - /// [UUID](https://developer.android.com/reference/java/util/UUID.html#UUID(long,%20long)) - pub fn new<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: i64, arg1: i64) -> ::std::result::Result<::java_spaghetti::Local<'env, Self>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "", .descriptor == "(JJ)V" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0), ::java_spaghetti::AsJValue::as_jvalue(&arg1)]; - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "\0", "(JJ)V\0"); - __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + unsafe impl ::java_spaghetti::JniType for UUID { + fn static_with_jni_type(callback: impl FnOnce(&str) -> R) -> R { + callback("java/util/UUID\0") + } + } + unsafe impl ::java_spaghetti::AssignableTo for UUID {} + impl ::std::ops::Deref for UUID { + type Target = super::lang::Object; + fn deref(&self) -> &Self::Target { + unsafe { &*(self as *const Self as *const Self::Target) } + } + } + impl UUID { + /// [UUID](https://developer.android.com/reference/java/util/UUID.html#UUID(long,%20long)) + pub fn new<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: i64, + arg1: i64, + ) -> ::std::result::Result< + ::java_spaghetti::Local<'env, Self>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "", .descriptor == "(JJ)V" + unsafe { + let __jni_args = [ + ::java_spaghetti::AsJValue::as_jvalue(&arg0), + ::java_spaghetti::AsJValue::as_jvalue(&arg1), + ]; + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "\0", "(JJ)V\0"); + __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [randomUUID](https://developer.android.com/reference/java/util/UUID.html#randomUUID()) - pub fn randomUUID<'env>(__jni_env: ::java_spaghetti::Env<'env>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, UUID>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/UUID", java.flags == PUBLIC | STATIC, .name == "randomUUID", .descriptor == "()Ljava/util/UUID;" - unsafe { - let __jni_args = []; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/UUID\0", "randomUUID\0", "()Ljava/util/UUID;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [randomUUID](https://developer.android.com/reference/java/util/UUID.html#randomUUID()) + pub fn randomUUID<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, UUID>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/UUID", java.flags == PUBLIC | STATIC, .name == "randomUUID", .descriptor == "()Ljava/util/UUID;" + unsafe { + let __jni_args = []; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/UUID\0", + "randomUUID\0", + "()Ljava/util/UUID;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [nameUUIDFromBytes](https://developer.android.com/reference/java/util/UUID.html#nameUUIDFromBytes(byte%5B%5D)) - pub fn nameUUIDFromBytes<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env ::java_spaghetti::ByteArray>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, UUID>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/UUID", java.flags == PUBLIC | STATIC, .name == "nameUUIDFromBytes", .descriptor == "([B)Ljava/util/UUID;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/UUID\0", "nameUUIDFromBytes\0", "([B)Ljava/util/UUID;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [nameUUIDFromBytes](https://developer.android.com/reference/java/util/UUID.html#nameUUIDFromBytes(byte%5B%5D)) + pub fn nameUUIDFromBytes<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg<::java_spaghetti::ByteArray>, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, UUID>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/UUID", java.flags == PUBLIC | STATIC, .name == "nameUUIDFromBytes", .descriptor == "([B)Ljava/util/UUID;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/UUID\0", + "nameUUIDFromBytes\0", + "([B)Ljava/util/UUID;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [fromString](https://developer.android.com/reference/java/util/UUID.html#fromString(java.lang.String)) - pub fn fromString<'env>(__jni_env: ::java_spaghetti::Env<'env>, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::String>>) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, UUID>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/UUID", java.flags == PUBLIC | STATIC, .name == "fromString", .descriptor == "(Ljava/lang/String;)Ljava/util/UUID;" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/UUID\0", "fromString\0", "(Ljava/lang/String;)Ljava/util/UUID;\0"); - __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) - } + /// [fromString](https://developer.android.com/reference/java/util/UUID.html#fromString(java.lang.String)) + pub fn fromString<'env>( + __jni_env: ::java_spaghetti::Env<'env>, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, UUID>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/UUID", java.flags == PUBLIC | STATIC, .name == "fromString", .descriptor == "(Ljava/lang/String;)Ljava/util/UUID;" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let (__jni_class, __jni_method) = __jni_env.require_class_static_method( + "java/util/UUID\0", + "fromString\0", + "(Ljava/lang/String;)Ljava/util/UUID;\0", + ); + __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr()) } + } - /// [getLeastSignificantBits](https://developer.android.com/reference/java/util/UUID.html#getLeastSignificantBits()) - pub fn getLeastSignificantBits<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "getLeastSignificantBits", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "getLeastSignificantBits\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getLeastSignificantBits](https://developer.android.com/reference/java/util/UUID.html#getLeastSignificantBits()) + pub fn getLeastSignificantBits<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "getLeastSignificantBits", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "getLeastSignificantBits\0", "()J\0"); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [getMostSignificantBits](https://developer.android.com/reference/java/util/UUID.html#getMostSignificantBits()) - pub fn getMostSignificantBits<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "getMostSignificantBits", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "getMostSignificantBits\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [getMostSignificantBits](https://developer.android.com/reference/java/util/UUID.html#getMostSignificantBits()) + pub fn getMostSignificantBits<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "getMostSignificantBits", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "getMostSignificantBits\0", "()J\0"); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [version](https://developer.android.com/reference/java/util/UUID.html#version()) - pub fn version<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "version", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "version\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [version](https://developer.android.com/reference/java/util/UUID.html#version()) + pub fn version<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "version", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "version\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [variant](https://developer.android.com/reference/java/util/UUID.html#variant()) - pub fn variant<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "variant", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "variant\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [variant](https://developer.android.com/reference/java/util/UUID.html#variant()) + pub fn variant<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "variant", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "variant\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [timestamp](https://developer.android.com/reference/java/util/UUID.html#timestamp()) - pub fn timestamp<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "timestamp", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "timestamp\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [timestamp](https://developer.android.com/reference/java/util/UUID.html#timestamp()) + pub fn timestamp<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "timestamp", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "timestamp\0", "()J\0"); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [clockSequence](https://developer.android.com/reference/java/util/UUID.html#clockSequence()) - pub fn clockSequence<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "clockSequence", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "clockSequence\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [clockSequence](https://developer.android.com/reference/java/util/UUID.html#clockSequence()) + pub fn clockSequence<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "clockSequence", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "clockSequence\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [node](https://developer.android.com/reference/java/util/UUID.html#node()) - pub fn node<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "node", .descriptor == "()J" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "node\0", "()J\0"); - __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [node](https://developer.android.com/reference/java/util/UUID.html#node()) + pub fn node<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "node", .descriptor == "()J" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "node\0", "()J\0"); + __jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [toString](https://developer.android.com/reference/java/util/UUID.html#toString()) - pub fn toString<'env>(&'env self) -> ::std::result::Result<::std::option::Option<::java_spaghetti::Local<'env, super::lang::String>>, ::java_spaghetti::Local<'env, super::lang::Throwable>> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "toString\0", "()Ljava/lang/String;\0"); - __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [toString](https://developer.android.com/reference/java/util/UUID.html#toString()) + pub fn toString<'env>( + &'env self, + ) -> ::std::result::Result< + ::std::option::Option<::java_spaghetti::Local<'env, super::lang::String>>, + ::java_spaghetti::Local<'env, super::lang::Throwable>, + > { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "toString", .descriptor == "()Ljava/lang/String;" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "toString\0", "()Ljava/lang/String;\0"); + __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [hashCode](https://developer.android.com/reference/java/util/UUID.html#hashCode()) - pub fn hashCode<'env>(&'env self) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" - unsafe { - let __jni_args = []; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "hashCode\0", "()I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [hashCode](https://developer.android.com/reference/java/util/UUID.html#hashCode()) + pub fn hashCode<'env>( + &'env self, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "hashCode", .descriptor == "()I" + unsafe { + let __jni_args = []; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "hashCode\0", "()I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [equals](https://developer.android.com/reference/java/util/UUID.html#equals(java.lang.Object)) - pub fn equals<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env super::lang::Object>>) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "equals\0", "(Ljava/lang/Object;)Z\0"); - __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [equals](https://developer.android.com/reference/java/util/UUID.html#equals(java.lang.Object)) + pub fn equals<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "equals", .descriptor == "(Ljava/lang/Object;)Z" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "equals\0", "(Ljava/lang/Object;)Z\0"); + __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } + } - /// [compareTo](https://developer.android.com/reference/java/util/UUID.html#compareTo(java.util.UUID)) - pub fn compareTo_UUID<'env>(&'env self, arg0: impl ::std::convert::Into<::std::option::Option<&'env UUID>>) -> ::std::result::Result> { - // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "compareTo", .descriptor == "(Ljava/util/UUID;)I" - unsafe { - let __jni_args = [::java_spaghetti::AsJValue::as_jvalue(&arg0.into())]; - let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); - let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/UUID\0", "compareTo\0", "(Ljava/util/UUID;)I\0"); - __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) - } + /// [compareTo](https://developer.android.com/reference/java/util/UUID.html#compareTo(java.util.UUID)) + pub fn compareTo_UUID<'env>( + &'env self, + arg0: impl ::java_spaghetti::AsArg, + ) -> ::std::result::Result> { + // class.path == "java/util/UUID", java.flags == PUBLIC, .name == "compareTo", .descriptor == "(Ljava/util/UUID;)I" + unsafe { + let __jni_args = [arg0.as_arg_jvalue()]; + let __jni_env = ::java_spaghetti::Env::from_raw(self.0.env); + let (__jni_class, __jni_method) = + __jni_env.require_class_method("java/util/UUID\0", "compareTo\0", "(Ljava/util/UUID;)I\0"); + __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } diff --git a/src/android/l2cap_channel.rs b/src/android/l2cap_channel.rs index f7736ed..6a2c723 100644 --- a/src/android/l2cap_channel.rs +++ b/src/android/l2cap_channel.rs @@ -52,7 +52,7 @@ pub fn open_l2cap_channel( let arr: Local = ByteArray::new(env, 1024); loop { - match stream.read_byte_array(&*arr) { + match stream.read_byte_array(&arr) { Ok(n) if n < 0 => { warn!("failed to read from l2cap channel: {}", n); break; @@ -90,8 +90,8 @@ pub fn open_l2cap_channel( break; } Ok(packet) => { - let b = PrimitiveArray::from(env, u8toi8(&packet)); - if let Err(e) = stream.write_byte_array(Some(&*b)) { + let b = ByteArray::new_from(env, u8toi8(&packet)); + if let Err(e) = stream.write_byte_array(b) { warn!("failed to write to l2cap channel: {:?}", e); break; };