* Removed all Id tags.
[cacao.git] / src / native / vm / gnu / gnu_java_lang_management_VMRuntimeMXBeanImpl.c
1 /* src/native/vm/gnu/gnu_java_lang_management_VMRuntimeMXBeanImpl.c
2
3    Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6    J. Wenninger, Institut f. Computersprachen - TU Wien
7
8    This file is part of CACAO.
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2, or (at
13    your option) any later version.
14
15    This program is distributed in the hope that it will be useful, but
16    WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23    02110-1301, USA.
24
25 */
26
27
28 #include "config.h"
29
30 #include <stdint.h>
31
32 #include "native/jni.h"
33 #include "native/native.h"
34
35 #include "native/include/gnu_java_lang_management_VMRuntimeMXBeanImpl.h"
36
37 #include "vm/builtin.h"
38 #include "vm/global.h"
39 #include "vm/vm.h"
40
41 #include "vmcore/class.h"
42 #include "vmcore/utf8.h"
43
44
45 /* native methods implemented by this file ************************************/
46
47 static JNINativeMethod methods[] = {
48         { "getInputArguments", "()[Ljava/lang/String;", (void *) (intptr_t) &Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getInputArguments },
49         { "getStartTime",      "()J",                   (void *) (intptr_t) &Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getStartTime      },
50 };
51
52
53 /* _Jv_gnu_java_lang_management_VMRuntimeMXBeanImpl_init ***********************
54
55    Register native functions.
56
57 *******************************************************************************/
58
59 void _Jv_gnu_java_lang_management_VMRuntimeMXBeanImpl_init(void)
60 {
61         utf *u;
62
63         u = utf_new_char("gnu/java/lang/management/VMRuntimeMXBeanImpl");
64
65         native_method_register(u, methods, NATIVE_METHODS_COUNT);
66 }
67
68
69 /*
70  * Class:     gnu/java/lang/management/VMRuntimeMXBeanImpl
71  * Method:    getInputArguments
72  * Signature: ()[Ljava/lang/String;
73  */
74 JNIEXPORT java_handle_objectarray_t* JNICALL Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getInputArguments(JNIEnv *env, jclass clazz)
75 {
76         log_println("Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getInputArguments: IMPLEMENT ME!");
77
78         return builtin_anewarray(0, class_java_lang_String);
79 }
80
81
82 /*
83  * Class:     gnu/java/lang/management/VMRuntimeMXBeanImpl
84  * Method:    getStartTime
85  * Signature: ()J
86  */
87 JNIEXPORT int64_t JNICALL Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getStartTime(JNIEnv *env, jclass clazz)
88 {
89         return _Jv_jvm->starttime;
90 }
91
92 /*
93  * These are local overrides for various environment variables in Emacs.
94  * Please do not remove this and leave it at the end of the file, where
95  * Emacs will automagically detect them.
96  * ---------------------------------------------------------------------
97  * Local variables:
98  * mode: c
99  * indent-tabs-mode: t
100  * c-basic-offset: 4
101  * tab-width: 4
102  * End:
103  * vim:noexpandtab:sw=4:ts=4:
104  */