JvmMethod

Struct JvmMethod 

Source
pub struct JvmMethod { /* private fields */ }
Expand description

Represents a method in a class in the JVM.

Implementations§

Source§

impl<'a> JvmMethod

Source

pub fn call_constructor( jvm_attachment: &JvmAttachment, jvm_class: &JvmClass<'_>, jvm_constructor_method: &JvmMethod, args: *const jvalue, ) -> jobject

Tries to call the given JVM object constructor in the given JVM class. Currently panics if a JVM exception occurs.

Source

pub fn call_static_boolean_method( jvm_attachment: &JvmAttachment, jvm_class: &JvmClass<'_>, jvm_method: &JvmMethod, args: *const jvalue, ) -> jboolean

Tries to call the given JVM static boolean method in the given JVM class. Currently panics if a JVM exception occurs.

Source

pub fn call_static_int_method( jvm_attachment: &JvmAttachment, jvm_class: &JvmClass<'_>, jvm_method: &JvmMethod, args: *const jvalue, ) -> jint

Tries to call the given JVM static int method in the given JVM class. Currently panics if a JVM exception occurs.

Source

pub fn call_static_object_method( jvm_attachment: &'a JvmAttachment, jvm_class: &JvmClass<'_>, jvm_method: &JvmMethod, args: *const jvalue, ) -> Option<JvmObject<'a>>

Source

pub fn call_static_void_method( jvm_attachment: &JvmAttachment, jvm_class: &JvmClass<'_>, jvm_method: &JvmMethod, args: *const jvalue, )

Tries to call the given JVM static void method in the given JVM class. Currently panics if a JVM exception occurs.

Source

pub fn get_constructor( jvm_attachment: &JvmAttachment, jvm_class: &JvmClass<'_>, jvm_method_signature: &str, ) -> Option<JvmMethod>

Tries to resolve the JVM constructor with the given signature in the given JVM class.

Source

pub fn get_method( jvm_attachment: &JvmAttachment, jvm_class: &JvmClass<'_>, jvm_method_name: &str, jvm_method_signature: &str, ) -> Option<JvmMethod>

Tries to resolve the JVM method with the given name and signature in the given JVM class.

Source

pub fn get_static_method( jvm_attachment: &JvmAttachment, jvm_class: &JvmClass<'_>, jvm_method_name: &str, jvm_method_signature: &str, ) -> Option<JvmMethod>

Tries to resolve the static JVM method with the given name and signature in the given JVM class.

Source

pub fn jvm_ptr(&self) -> jmethodID

Source

pub fn new(jvm_method_ptr: jmethodID) -> Option<JvmMethod>

Auto Trait Implementations§

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.