* src/vm/signal.c (signal_thread): Restart sigwait if it has been
[cacao.git] / src / native / vm / reflect.h
1 /* src/native/vm/reflect.h - helper functions for java/lang/reflect
2
3    Copyright (C) 2007, 2008
4    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
6    This file is part of CACAO.
7
8    This program is free software; you can redistribute it and/or
9    modify it under the terms of the GNU General Public License as
10    published by the Free Software Foundation; either version 2, or (at
11    your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23 */
24
25
26 #ifndef _REFLECT_H
27 #define _REFLECT_H
28
29 #include "config.h"
30
31 #include <stdint.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #include "native/jni.h"
38 #include "native/native.h"
39
40 /* Keep this order of the native includes. */
41
42 #include "native/include/java_lang_String.h"
43
44 #if defined(ENABLE_JAVASE)
45 # if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
46 #  include "native/include/java_nio_ByteBuffer.h"       /* required by j.l.CL */
47 # endif
48 # include "native/include/java_lang_ClassLoader.h"
49 #endif
50
51 #include "native/include/java_lang_Object.h"
52 #include "native/include/java_lang_Class.h"
53
54 #if defined(ENABLE_JAVASE)
55 # include "native/include/java_lang_reflect_Constructor.h"
56 # include "native/include/java_lang_reflect_Field.h"
57 # include "native/include/java_lang_reflect_Method.h"
58 #endif
59
60 #include "vmcore/field.h"
61 #include "vmcore/method.h"
62
63
64 /* function prototypes ********************************************************/
65
66 java_lang_reflect_Constructor *reflect_constructor_new(methodinfo *m);
67 java_lang_reflect_Field       *reflect_field_new(fieldinfo *f);
68 java_lang_reflect_Method      *reflect_method_new(methodinfo *m);
69 java_handle_t                 *reflect_constructor_newinstance(methodinfo *m, java_handle_objectarray_t *args, bool override);
70 java_handle_t                 *reflect_method_invoke(methodinfo *m, java_handle_t *o, java_handle_objectarray_t *args, bool override);
71
72 #if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH) && defined(ENABLE_ANNOTATIONS)
73 struct java_util_Map* reflect_get_declaredannotations(
74         java_handle_bytearray_t *annotations,
75         classinfo               *declaringClass,
76         classinfo               *referer);
77
78 java_handle_objectarray_t* reflect_get_parameterannotations(
79         java_handle_t   *parameterAnnotations,
80         methodinfo      *m,
81         classinfo       *referer);
82 #endif
83
84 #ifdef __cplusplus
85 }
86 #endif
87
88 #endif /* _REFLECT_H */
89
90
91 /*
92  * These are local overrides for various environment variables in Emacs.
93  * Please do not remove this and leave it at the end of the file, where
94  * Emacs will automagically detect them.
95  * ---------------------------------------------------------------------
96  * Local variables:
97  * mode: c
98  * indent-tabs-mode: t
99  * c-basic-offset: 4
100  * tab-width: 4
101  * End:
102  * vim:noexpandtab:sw=4:ts=4:
103  */