jvmti_rs/wrapper/jvmtifns/
breakpoint_static.rs

1use jni::strings::JNIString;
2
3use crate::{errors::*, JVMTIEnv, objects::*, Transform};
4use crate::sys::jlocation;
5
6impl<'a> JVMTIEnv<'a> {
7    pub fn set_breakpoint_s<K, M, V>(&self, jni: &jni::JNIEnv<'a>, class: K, name: M, sig: V, location: jlocation) -> Result<()>
8        where
9            K: Transform<'a, JClass<'a>>,
10            M: Into<JNIString>,
11            V: Into<JNIString> {
12        let method = self.get_static_method_id(jni, class, name, sig)?;
13
14        jvmti_call!(self.jvmti_raw(), SetBreakpoint,
15            method.into_inner(),
16            location
17        )
18    }
19
20    pub fn clear_breakpoint_s<K, M, V>(&self, jni: &jni::JNIEnv<'a>, class: K, name: M, sig: V, location: jlocation) -> Result<()>
21        where
22            K: Transform<'a, JClass<'a>>,
23            M: Into<JNIString>,
24            V: Into<JNIString> {
25        let method = self.get_static_method_id(jni, class, name, sig)?;
26
27        jvmti_call!(self.jvmti_raw(), ClearBreakpoint,
28            method.into_inner(),
29            location
30        )
31    }
32}