pub struct Class<'a> { /* private fields */ }
Expand description
A struct wrapping a JClass
Implementations§
source§impl<'a> Class<'a>
impl<'a> Class<'a>
sourcepub fn call_static_method(
&self,
name: &str,
signature: Signature<'_>,
args: &[Value<'_>]
) -> Result<JValueGen<JObject<'_>>>
pub fn call_static_method( &self, name: &str, signature: Signature<'_>, args: &[Value<'_>] ) -> Result<JValueGen<JObject<'_>>>
Calls a static method on the class
Arguments
name
- The name of the methodsignature
- The signature of the methodargs
- The arguments to pass to the method
sourcepub fn create(
&self,
signature: Signature<'_>,
args: &[Value<'_>]
) -> Result<JObject<'_>>
pub fn create( &self, signature: Signature<'_>, args: &[Value<'_>] ) -> Result<JObject<'_>>
Creates an instance of the class
Arguments
signature
- The signature of the constructorargs
- The arguments to pass to the constructor
sourcepub fn get_static_field(
&self,
name: &str,
type: Type<'_>
) -> Result<JValueGen<JObject<'_>>>
pub fn get_static_field( &self, name: &str, type: Type<'_> ) -> Result<JValueGen<JObject<'_>>>
Gets a static field on the class
Arguments
name
- The name of the fieldtype
- The type of the field
sourcepub fn set_static_field(
&self,
name: &str,
type: Type<'_>,
value: Value<'_>
) -> Result<()>
pub fn set_static_field( &self, name: &str, type: Type<'_>, value: Value<'_> ) -> Result<()>
Sets a static field on the class
Arguments
name
- The name of the fieldvalue
- The value to set the field to
sourcepub fn get_static_field_id(
&self,
name: &str,
type: Type<'_>
) -> Result<JStaticFieldID>
pub fn get_static_field_id( &self, name: &str, type: Type<'_> ) -> Result<JStaticFieldID>
Get a static field ID on the class
Arguments
name
- The name of the fieldsignature
- The signature of the field
Auto Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more