MCPcopy Create free account
hub / github.com/cretz/stackparam / method_name

Function method_name

src/native.rs:464–471  ·  view source on GitHub ↗
(method: jmethodID)

Source from the content-addressed store, hash-verified

462}
463
464unsafe fn method_name(method: jmethodID) -> Result<String, String> {
465 let mut name: *mut c_char = 0 as *mut c_char;
466 let name_res = (**JVMTI_ENV).GetMethodName.unwrap()(JVMTI_ENV, method, &mut name, ptr::null_mut(), ptr::null_mut());
467 util::unit_or_jvmti_err(name_res)?;
468 let name_str = CStr::from_ptr(name).to_string_lossy().clone().into_owned();
469 dealloc(name)?;
470 return Result::Ok(name_str);
471}
472
473unsafe fn get_stack_trace(thread: jthread, max_depth: jint) -> Result<Vec<jvmtiFrameInfo>, String> {
474 let mut frames: Vec<jvmtiFrameInfo> = Vec::with_capacity(max_depth as usize);

Callers

nothing calls this directly

Calls 3

unit_or_jvmti_errFunction · 0.85
deallocFunction · 0.85
cloneMethod · 0.80

Tested by

no test coverage detected