summaryrefslogtreecommitdiff
path: root/src/jvm
diff options
context:
space:
mode:
Diffstat (limited to 'src/jvm')
-rw-r--r--src/jvm/jvm.c6
-rw-r--r--src/jvm/jvm.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/jvm/jvm.c b/src/jvm/jvm.c
index 20e868a..7ac8c6b 100644
--- a/src/jvm/jvm.c
+++ b/src/jvm/jvm.c
@@ -1627,6 +1627,12 @@ vm_init(JavaVM *vm, struct JNIInvokeInterface *invoke)
*vm = invoke;
}
+const char*
+jvm_get_class_name(struct jvm *jvm, jobject object)
+{
+ return jvm_get_object_of_type(jvm, object, JVM_OBJECT_CLASS)->klass.name.data;
+}
+
void*
jvm_get_native_method(struct jvm *jvm, const char *klass, const char *method)
{
diff --git a/src/jvm/jvm.h b/src/jvm/jvm.h
index e2f99e4..b3f37a1 100644
--- a/src/jvm/jvm.h
+++ b/src/jvm/jvm.h
@@ -72,6 +72,9 @@ struct jvm {
JavaVM vm; // points to invoke
};
+const char*
+jvm_get_class_name(struct jvm *jvm, jobject object);
+
void*
jvm_get_native_method(struct jvm *jvm, const char *klass, const char *method);