diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-11-18 16:35:05 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-11-18 16:35:05 +0200 |
commit | 9a59d14d0a457a714dc9421a1f9bd28b6ae3a86f (patch) | |
tree | 1c967fd6fd2950364beb3e3509972d831821cf23 /src/jvm | |
parent | f7ddf10124ce9dbf4c99586b7d809ae809f0c81d (diff) |
standalone libjvm-java
Diffstat (limited to 'src/jvm')
-rw-r--r-- | src/jvm/jvm.c | 6 | ||||
-rw-r--r-- | src/jvm/jvm.h | 3 |
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); |