Merged revisions 7797-7917 via svnmerge from
[cacao.git] / src / native / vm / gnu / java_lang_management_VMManagementFactory.c
index 54b902447d0239bb43bb9908f3d48e1edebe17b7..e4e78fa0b96d117555b28cae7c2f8fdc9582f152 100644 (file)
@@ -34,6 +34,9 @@
 #include "vm/types.h"
 
 #include "native/jni.h"
+#include "native/native.h"
+
+#include "native/include/java_lang_management_VMManagementFactory.h"
 
 #include "toolbox/logging.h"
 
 #include "vmcore/class.h"
 
 
+/* native methods implemented by this file ************************************/
+
+static JNINativeMethod methods[] = {
+       { "getMemoryPoolNames",       "()[Ljava/lang/String;", (void *) (ptrint) &Java_java_lang_management_VMManagementFactory_getMemoryPoolNames       },
+       { "getMemoryManagerNames",    "()[Ljava/lang/String;", (void *) (ptrint) &Java_java_lang_management_VMManagementFactory_getMemoryManagerNames    },
+       { "getGarbageCollectorNames", "()[Ljava/lang/String;", (void *) (ptrint) &Java_java_lang_management_VMManagementFactory_getGarbageCollectorNames },
+};
+
+
+/* _Jv_java_lang_management_VMManagementFactory_init ***************************
+
+   Register native functions.
+
+*******************************************************************************/
+
+void _Jv_java_lang_management_VMManagementFactory_init(void)
+{
+       utf *u;
+
+       u = utf_new_char("java/lang/management/VMManagementFactory");
+
+       native_method_register(u, methods, NATIVE_METHODS_COUNT);
+}
+
+
 /*
  * Class:     java/lang/management/VMManagementFactory
  * Method:    getMemoryPoolNames