[−][src]Struct jni::JavaVM
The invocation API.
Methods
impl JavaVM
[src]
pub unsafe fn from_raw(ptr: *mut JavaVM) -> Result<Self>
[src]
Create a JavaVM from a raw pointer.
pub fn get_java_vm_pointer(&self) -> *mut JavaVM
[src]
Returns underlying sys::JavaVM
interface.
pub fn attach_current_thread(&self) -> Result<AttachGuard>
[src]
Attaches the current thread to a Java VM. The resulting AttachGuard
can be dereferenced to a JNIEnv
and automatically detaches the thread
when dropped. Calling this for a thread that is already attached is a no-op.
pub fn attach_current_thread_as_daemon(&self) -> Result<JNIEnv>
[src]
Attaches the current thread to a Java VM as a daemon.
pub fn get_env(&self) -> Result<JNIEnv>
[src]
Get the JNIEnv
associated with the current thread, or
ErrorKind::Detached
if the current thread is not attached to the java VM.
Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,