#[repr(transparent)]pub struct JClass<'local>(_);
Expand description
Lifetime’d representation of a jclass
. Just a JObject
wrapped in a new
class.
Implementations§
source§impl<'local> JClass<'local>
impl<'local> JClass<'local>
sourcepub unsafe fn from_raw(raw: jclass) -> Self
pub unsafe fn from_raw(raw: jclass) -> Self
Creates a JClass
that wraps the given raw
jclass
Safety
raw
may be a null pointer. If raw
is not a null pointer, then:
raw
must be a valid raw JNI local reference.- There must not be any other
JObject
representing the same local reference. - The lifetime
'local
must not outlive the local reference frame that the local reference was created in.
Methods from Deref<Target = JObject<'local>>§
Trait Implementations§
source§impl<'local, 'obj_ref> Desc<'local, JClass<'static>> for &'obj_ref GlobalRef
impl<'local, 'obj_ref> Desc<'local, JClass<'static>> for &'obj_ref GlobalRef
This conversion assumes that the GlobalRef
is a pointer to a class object.
source§impl<'local, 'obj_ref> From<&'obj_ref JObject<'local>> for &'obj_ref JClass<'local>
impl<'local, 'obj_ref> From<&'obj_ref JObject<'local>> for &'obj_ref JClass<'local>
This conversion assumes that the JObject
is a pointer to a class object.