Struct Class

Source
pub struct Class<'a> { /* private fields */ }
Expand description

Analogous to a java.lang.Class object.

A notable absence from this is the class name, which is available via crate::LoadClass records.

Implementations§

Source§

impl<'a> Class<'a>

Source

pub fn obj_id(&self) -> Id

Source

pub fn stack_trace_serial(&self) -> Serial

Source

pub fn super_class_obj_id(&self) -> Option<Id>

None when there is no superclass, e.g. for java.lang.Object.

Source

pub fn class_loader_obj_id(&self) -> Option<Id>

Source

pub fn signers_obj_id(&self) -> Option<Id>

Source

pub fn protection_domain_obj_id(&self) -> Option<Id>

Source

pub fn instance_size_bytes(&self) -> u32

Source§

impl<'a> Class<'a>

Source

pub fn static_fields(&self) -> StaticFieldEntries<'_>

Iterate over StaticFieldEntry data.

Source

pub fn instance_field_descriptors(&self) -> FieldDescriptors<'_>

Iterate over FieldDescriptor data.

Contains only the instance fields defined in this class, not in superclasses.

An object’s fields are serialized with the concrete type’s fields first, then that class’s superclass, and so forth, up to the root of the hierarchy.

Auto Trait Implementations§

§

impl<'a> Freeze for Class<'a>

§

impl<'a> RefUnwindSafe for Class<'a>

§

impl<'a> Send for Class<'a>

§

impl<'a> Sync for Class<'a>

§

impl<'a> Unpin for Class<'a>

§

impl<'a> UnwindSafe for Class<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.