* Removed all Id tags.
[cacao.git] / src / native / vm / java_lang_Class.h
1 /* src/native/vm/java_lang_Class.h - java/lang/Class functions
2
3    Copyright (C) 2006, 2007 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5    C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6    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 #ifndef _JV_JAVA_LANG_CLASS_H
29 #define _JV_JAVA_LANG_CLASS_H
30
31 #include "config.h"
32
33 #include <stdint.h>
34
35 #include "vm/types.h"
36
37 #include "native/jni.h"
38
39 #include "native/include/java_lang_String.h" /* required by java_lang_Class.h */
40 #include "native/include/java_lang_Class.h"
41 #include "native/include/java_lang_Object.h"
42
43 #if defined(ENABLE_JAVASE)
44 # include "native/include/java_lang_ClassLoader.h"
45 # include "native/include/java_lang_Throwable.h"
46 # include "native/include/java_lang_reflect_Constructor.h"
47 # include "native/include/java_lang_reflect_Method.h"
48 #endif
49
50
51 /* function prototypes ********************************************************/
52
53 java_lang_String              *_Jv_java_lang_Class_getName(java_lang_Class *klass);
54
55 #if defined(ENABLE_JAVASE)
56 java_lang_Class               *_Jv_java_lang_Class_forName(java_lang_String *name, s4 initialize, java_lang_ClassLoader *loader);
57 #elif defined(ENABLE_JAVAME_CLDC1_1)
58 java_lang_Class               *_Jv_java_lang_Class_forName(java_lang_String *name);
59 #endif
60
61 s4                             _Jv_java_lang_Class_isInstance(java_lang_Class *klass, java_lang_Object *o);
62 s4                             _Jv_java_lang_Class_isAssignableFrom(java_lang_Class *klass, java_lang_Class *c);
63 JNIEXPORT int32_t JNICALL      _Jv_java_lang_Class_isInterface(JNIEnv *env, java_lang_Class *this);
64
65 #if defined(ENABLE_JAVASE)
66 s4                             _Jv_java_lang_Class_isPrimitive(java_lang_Class *klass);
67 java_lang_Class               *_Jv_java_lang_Class_getSuperclass(java_lang_Class *klass);
68 java_handle_objectarray_t     *_Jv_java_lang_Class_getInterfaces(java_lang_Class *klass);
69 s4                             _Jv_java_lang_Class_getModifiers(java_lang_Class *klass, s4 ignoreInnerClassesAttrib);
70 java_lang_Class               *_Jv_java_lang_Class_getDeclaringClass(java_lang_Class *klass);
71 java_handle_objectarray_t     *_Jv_java_lang_Class_getDeclaredClasses(java_lang_Class *klass, s4 publicOnly);
72 java_handle_objectarray_t     *_Jv_java_lang_Class_getDeclaredFields(java_lang_Class *klass, s4 publicOnly);
73 java_handle_objectarray_t     *_Jv_java_lang_Class_getDeclaredMethods(java_lang_Class *klass, s4 publicOnly);
74 java_handle_objectarray_t     *_Jv_java_lang_Class_getDeclaredConstructors(java_lang_Class *klass, s4 publicOnly);
75 java_lang_ClassLoader         *_Jv_java_lang_Class_getClassLoader(java_lang_Class *klass);
76 #endif
77
78 JNIEXPORT int32_t JNICALL      _Jv_java_lang_Class_isArray(JNIEnv *env, java_lang_Class *this);
79
80 #if defined(ENABLE_JAVASE)
81 void                           _Jv_java_lang_Class_throwException(java_lang_Throwable *t);
82
83 #if defined(WITH_CLASSPATH_GNU) && defined(ENABLE_ANNOTATIONS)
84 java_handle_objectarray_t     *_Jv_java_lang_Class_getDeclaredAnnotations(java_lang_Class* klass);
85 #endif
86
87 java_lang_reflect_Constructor *_Jv_java_lang_Class_getEnclosingConstructor(java_lang_Class *klass);
88 java_lang_reflect_Method      *_Jv_java_lang_Class_getEnclosingMethod(java_lang_Class *klass);
89
90 java_lang_String              *_Jv_java_lang_Class_getClassSignature(java_lang_Class* klass);
91 #endif
92
93 #endif /* _JV_JAVA_LANG_CLASS_H */
94
95
96 /*
97  * These are local overrides for various environment variables in Emacs.
98  * Please do not remove this and leave it at the end of the file, where
99  * Emacs will automagically detect them.
100  * ---------------------------------------------------------------------
101  * Local variables:
102  * mode: c
103  * indent-tabs-mode: t
104  * c-basic-offset: 4
105  * tab-width: 4
106  * End:
107  * vim:noexpandtab:sw=4:ts=4:
108  */