#[rustfmt::skip] // This file has been automatically generated by `jnim` from `ComponentCallbacks.class`. // DO NOT EDIT use jnim::*; pub trait ComponentCallbacks: AsRef { fn component_callbacks_class(env: Option<&JEnv>) -> Option { const NAME: &'static [u8] = b"android/content/ComponentCallbacks\0"; static CACHE: CachedID = CachedID::new(); CACHE.get(|| JEnv::env(env)?.find_class(NAME)) } fn on_configuration_changed<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::content::res::Configuration) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::component_callbacks_class(Some(env))?.method( env, b"onConfigurationChanged\0", b"(Landroid/content/res/Configuration;)V\0", ) })? .call(env, self.as_ref(), (arg0,)) } fn on_low_memory<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::component_callbacks_class(Some(env))?.method(env, b"onLowMemory\0", b"()V\0"))? .call(env, self.as_ref(), ()) } } pub struct ComponentCallbacksObject { __object: JObject, } impl ComponentCallbacks for ComponentCallbacksObject {} impl JNameMaker for ComponentCallbacksObject { const JAVA_PATH: &'static [u8] = b"android/content/ComponentCallbacks\0"; } impl JPlainMarker for ComponentCallbacksObject { 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 ComponentCallbacksObject { type Target = JObject; fn deref(&self) -> &Self::Target { &self.__object } } impl AsRef for ComponentCallbacksObject { fn as_ref(&self) -> &JObject { &self.__object } } #[test] fn test_type_zero() { assert_eq!(0, std::mem::size_of::()); }