* src/lib/gnu/java/lang/reflect/Method.java
[cacao.git] / src / vmcore / annotation.h
1 /* src/vmcore/annotation.h - class annotations
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 _ANNOTATION_H
29 #define _ANNOTATION_H
30
31 /* forward typedefs ***********************************************************/
32
33 typedef struct annotation_bytearray_t annotation_bytearray_t;
34 typedef struct annotation_t           annotation_t;
35 typedef struct element_value_t        element_value_t;
36 typedef struct annotation_bytearrays_t annotation_bytearrays_t;
37
38 #include "config.h"
39 #include "vm/types.h"
40
41 #include "vm/global.h"
42
43 #include "vmcore/class.h"
44 #include "vmcore/field.h"
45 #include "vmcore/method.h"
46 #include "vmcore/loader.h"
47 #include "vmcore/utf8.h"
48
49
50 /* annotation_bytearray *******************************************************/
51
52 struct annotation_bytearray_t {
53         uint32_t size;
54         uint8_t  data[1];
55 };
56
57
58 /* annotation_bytearrays ******************************************************/
59
60 struct annotation_bytearrays_t {
61         uint32_t size;
62         annotation_bytearray_t *data[1];
63 };
64
65
66 /* function prototypes ********************************************************/
67
68 annotation_bytearray_t *annotation_bytearray_new(uint32_t size);
69
70 void annotation_bytearray_free(annotation_bytearray_t *ba);
71
72 annotation_bytearrays_t *annotation_bytearrays_new(uint32_t size);
73
74 bool annotation_bytearrays_resize(annotation_bytearrays_t **bas,
75         uint32_t size);
76
77 bool annotation_bytearrays_insert(annotation_bytearrays_t **bas,
78         uint32_t index, annotation_bytearray_t *ba);
79
80 void annotation_bytearrays_free(annotation_bytearrays_t *bas);
81
82 bool annotation_load_class_attribute_runtimevisibleannotations(
83         classbuffer *cb);
84
85 bool annotation_load_class_attribute_runtimeinvisibleannotations(
86         classbuffer *cb);
87
88 bool annotation_load_method_attribute_runtimevisibleannotations(
89         classbuffer *cb, methodinfo *m);
90
91 bool annotation_load_method_attribute_runtimeinvisibleannotations(
92         classbuffer *cb, methodinfo *m);
93
94 bool annotation_load_field_attribute_runtimevisibleannotations(
95         classbuffer *cb, fieldinfo *f);
96
97 bool annotation_load_field_attribute_runtimeinvisibleannotations(
98         classbuffer *cb, fieldinfo *f);
99
100 bool annotation_load_method_attribute_annotationdefault(
101         classbuffer *cb, methodinfo *m);
102
103 bool annotation_load_method_attribute_runtimevisibleparameterannotations(
104         classbuffer *cb, methodinfo *m);
105
106 bool annotation_load_method_attribute_runtimeinvisibleparameterannotations(
107         classbuffer *cb, methodinfo *m);
108
109 #endif /* _ANNOTATION_H */
110
111
112 /*
113  * These are local overrides for various environment variables in Emacs.
114  * Please do not remove this and leave it at the end of the file, where
115  * Emacs will automagically detect them.
116  * ---------------------------------------------------------------------
117  * Local variables:
118  * mode: c
119  * indent-tabs-mode: t
120  * c-basic-offset: 4
121  * tab-width: 4
122  * End:
123  * vim:noexpandtab:sw=4:ts=4:
124  */