#[rustfmt::skip] // This file has been automatically generated by `jnim` from `Parcelable.class`. // DO NOT EDIT use jnim::*; pub trait Parcelable: AsRef { const CONTENTS_FILE_DESCRIPTOR: i32 = 1i32; const PARCELABLE_WRITE_RETURN_VALUE: i32 = 1i32; fn parcelable_class(env: Option<&JEnv>) -> Option { const NAME: &'static [u8] = b"android/os/Parcelable\0"; static CACHE: CachedID = CachedID::new(); CACHE.get(|| JEnv::env(env)?.find_class(NAME)) } fn describe_contents<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::parcelable_class(Some(env))?.method(env, b"describeContents\0", b"()I\0"))? .call(env, self.as_ref(), ()) } fn write_to_parcel<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::parcelable_class(Some(env))?.method(env, b"writeToParcel\0", b"(Landroid/os/Parcel;I)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } } pub struct ParcelableObject { __object: JObject, } impl Parcelable for ParcelableObject {} impl JNameMaker for ParcelableObject { const JAVA_PATH: &'static [u8] = b"android/os/Parcelable\0"; } impl JPlainMarker for ParcelableObject { fn class(env: Option<&JEnv>) -> Option { static CACHE: CachedID = CachedID::new(); CACHE.get(|| JEnv::env(env)?.find_class(Self::JAVA_PATH)) } } impl core::ops::Deref for ParcelableObject { type Target = JObject; fn deref(&self) -> &Self::Target { &self.__object } } impl AsRef for ParcelableObject { fn as_ref(&self) -> &JObject { &self.__object } } #[test] fn test_type_zero() { assert_eq!(0, std::mem::size_of::()); }