jvmti_rs/wrapper/facade/
local_variable.rs

1use crate::{sys::*, errors::*, objects::*, JVMTIFacadeEnv};
2
3impl<'a> JVMTIFacadeEnv<'a> {
4    pub fn get_local_instance(&self, thread: &JThreadID, depth: jint) -> Result<Option<JObject>> {
5        self.jvmti_rust().get_local_instance(thread, depth)
6    }
7
8    pub fn get_local_object(&self, thread: &JThreadID, depth: jint, slot: jint) -> Result<Option<JObject>> {
9        self.jvmti_rust().get_local_object(thread, depth, slot)
10    }
11
12    pub fn get_local_int(&self, thread: &JThreadID, depth: jint, slot: jint) -> Result<jint> {
13        self.jvmti_rust().get_local_int(thread, depth, slot)
14    }
15
16    pub fn get_local_long(&self, thread: &JThreadID, depth: jint, slot: jint) -> Result<jlong> {
17        self.jvmti_rust().get_local_long(thread, depth, slot)
18    }
19
20    pub fn get_local_float(&self, thread: &JThreadID, depth: jint, slot: jint) -> Result<jfloat> {
21        self.jvmti_rust().get_local_float(thread, depth, slot)
22    }
23
24    pub fn get_local_double(&self, thread: &JThreadID, depth: jint, slot: jint) -> Result<jdouble> {
25        self.jvmti_rust().get_local_double(thread, depth, slot)
26    }
27
28    pub fn set_local_object(&self, thread: &JThreadID, depth: jint, slot: jint, obj: &Option<JObject>) -> Result<()> {
29        self.jvmti_rust().set_local_object(thread, depth, slot, obj)
30    }
31
32    pub fn set_local_int(&self, thread: &JThreadID, depth: jint, slot: jint, value: jint) -> Result<()> {
33        self.jvmti_rust().set_local_int(thread, depth, slot, value)
34    }
35
36    pub fn set_local_long(&self, thread: &JThreadID, depth: jint, slot: jint, value: jlong) -> Result<()> {
37        self.jvmti_rust().set_local_long(thread, depth, slot, value)
38    }
39
40    pub fn set_local_float(&self, thread: &JThreadID, depth: jint, slot: jint, value: jfloat) -> Result<()> {
41        self.jvmti_rust().set_local_float(thread, depth, slot, value)
42    }
43
44    pub fn set_local_double(&self, thread: &JThreadID, depth: jint, slot: jint, value: jdouble) -> Result<()> {
45        self.jvmti_rust().set_local_double(thread, depth, slot, value)
46    }
47}