Struct rucaja::Jvm
[−]
[src]
pub struct Jvm { /* fields omitted */ }
Holds a reference to the embedded JVM.
Methods
impl Jvm
[src]
fn jvm(&self) -> *mut JavaVM
[src]
unsafe fn new(jvm_option_strings: &[&str]) -> Jvm
[src]
Tries to instantiate the embedded JVM.
The JNI does not allow the creation of multiple JVMs in the same process (it seems, not even
sequentially). An attempt will result in a panic
.
Arguments
jvm_option_strings
- a list of JVM option strings.
Example
use rucaja::Jvm; unsafe { Jvm::new(&["-Xcheck:jni"]); }
unsafe fn call_constructor(
&self,
jvm_class: &JvmClass,
jvm_constructor_method: &JvmMethod,
args: *const jvalue
) -> jobject
[src]
&self,
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.
unsafe fn call_static_boolean_method(
&self,
jvm_class: &JvmClass,
jvm_method: &JvmMethod,
args: *const jvalue
) -> jboolean
[src]
&self,
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.
unsafe fn call_static_object_method(
&self,
jvm_class: &JvmClass,
jvm_method: &JvmMethod,
args: *const jvalue
) -> Option<JvmObject>
[src]
&self,
jvm_class: &JvmClass,
jvm_method: &JvmMethod,
args: *const jvalue
) -> Option<JvmObject>
unsafe fn call_static_void_method(
&self,
jvm_class: &JvmClass,
jvm_method: &JvmMethod,
args: *const jvalue
)
[src]
&self,
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.
unsafe fn get_class(&self, jvm_class_name: &str) -> Option<JvmClass>
[src]
Tries to resolve the JVM class with the given name.
unsafe fn get_constructor(
&self,
jvm_class: &JvmClass,
jvm_method_signature: &str
) -> Option<JvmMethod>
[src]
&self,
jvm_class: &JvmClass,
jvm_method_signature: &str
) -> Option<JvmMethod>
Tries to resolve the JVM constructor with the given signature in the given JVM class.
unsafe fn get_method(
&self,
jvm_class: &JvmClass,
jvm_method_name: &str,
jvm_method_signature: &str
) -> Option<JvmMethod>
[src]
&self,
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.
unsafe fn get_static_method(
&self,
jvm_class: &JvmClass,
jvm_method_name: &str,
jvm_method_signature: &str
) -> Option<JvmMethod>
[src]
&self,
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.
unsafe fn new_jvm_string(&self, string: &str) -> Option<JvmString>
[src]
Creates and returns a JVM string.