#[rustfmt::skip] // This file has been automatically generated by `jnim` from `AutoCloseable.class`. // DO NOT EDIT use jnim::*; pub trait AutoCloseable: AsRef { fn auto_closeable_class(env: Option<&JEnv>) -> Option { const NAME: &'static [u8] = b"java/lang/AutoCloseable\0"; static CACHE: CachedID = CachedID::new(); CACHE.get(|| JEnv::env(env)?.find_class(NAME)) } } pub struct AutoCloseableObject { __object: JObject, } impl AutoCloseable for AutoCloseableObject {} impl JNameMaker for AutoCloseableObject { const JAVA_PATH: &'static [u8] = b"java/lang/AutoCloseable\0"; } impl JPlainMarker for AutoCloseableObject { 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 AutoCloseableObject { type Target = JObject; fn deref(&self) -> &Self::Target { &self.__object } } impl AsRef for AutoCloseableObject { fn as_ref(&self) -> &JObject { &self.__object } } #[test] fn test_type_zero() { assert_eq!(0, std::mem::size_of::()); }