1 /* Copyright (C) 1998, 1999 Cygnus Solutions
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
13 #define _Jv_va_list va_list
17 // This is wrong, because it pollutes the name-space too much!
18 #include <gcj/javaprims.h>
20 typedef struct _Jv_JNIEnv JNIEnv
;
23 typedef int jbyte
__attribute__((__mode__(__QI__
)));
24 typedef int jshort
__attribute__((__mode__(__HI__
)));
25 typedef int jint
__attribute__((__mode__(__SI__
)));
26 typedef int jlong
__attribute__((__mode__(__DI__
)));
27 typedef bool jboolean
__attribute__((__mode__(__QI__
)));
28 typedef unsigned short jchar
__attribute__((__mode__(__HI__
)));
30 typedef double jdouble
;
33 typedef const struct JNINativeInterface
*JNIEnv
;
49 typedef void * (*_Jv_func
)(...);
51 struct JNINativeInterface
63 jclass (*GetSuperclass
) (JNIEnv
*, jclass
);
64 jboolean (*IsAssignableFrom
) (JNIEnv
*, jclass
, jclass
);
66 jint (*Throw
) (JNIEnv
*, jthrowable
);
68 _Jv_func ExceptionOccurred
;
69 _Jv_func ExceptionDescribe
;
70 _Jv_func ExceptionClear
;
74 _Jv_func NewGlobalRef
;
75 _Jv_func DeleteGlobalRef
;
76 _Jv_func DeleteLocalRef
;
77 _Jv_func IsSameObject
;
84 _Jv_func GetObjectClass
;
85 _Jv_func IsInstanceOf
;
87 _Jv_func CallObjectMethod
;
88 _Jv_func CallObjectMethodV
;
89 _Jv_func CallObjectMethodA
;
90 _Jv_func CallBooleanMethod
;
91 _Jv_func CallBooleanMethodV
;
92 _Jv_func CallBooleanMethodA
;
93 _Jv_func CallByteMethod
;
94 _Jv_func CallByteMethodV
;
95 _Jv_func CallByteMethodA
;
96 _Jv_func CallCharMethod
;
97 _Jv_func CallCharMethodV
;
98 _Jv_func CallCharMethodA
;
99 _Jv_func CallShortMethod
;
100 _Jv_func CallShortMethodV
;
101 _Jv_func CallShortMethodA
;
102 _Jv_func CallIntMethod
;
103 _Jv_func CallIntMethodV
;
104 _Jv_func CallIntMethodA
;
105 _Jv_func CallLongMethod
;
106 _Jv_func CallLongMethodV
;
107 _Jv_func CallLongMethodA
;
108 _Jv_func CallFloatMethod
;
109 _Jv_func CallFloatMethodV
;
110 _Jv_func CallFloatMethodA
;
111 _Jv_func CallDoubleMethod
;
112 _Jv_func CallDoubleMethodV
;
113 _Jv_func CallDoubleMethodA
;
114 _Jv_func CallVoidMethod
;
115 _Jv_func CallVoidMethodV
;
116 _Jv_func CallVoidMethodA
;
117 _Jv_func CallNonvirtualObjectMethod
;
118 _Jv_func CallNonvirtualObjectMethodV
;
119 _Jv_func CallNonvirtualObjectMethodA
;
120 jboolean (*CallNonvirtualBooleanMethod
) (JNIEnv
*, jobject
, jclass
, jmethodID
, ...);
121 jboolean (*CallNonvirtualBooleanMethodV
) (JNIEnv
*, jobject
, jclass
, jmethodID
, _Jv_va_list
);
122 jboolean (*CallNonvirtualBooleanMethodA
) (JNIEnv
*, jobject
, jclass
, jmethodID
, jvalue
*);
123 _Jv_func CallNonvirtualByteMethod
;
124 _Jv_func CallNonvirtualByteMethodV
;
125 _Jv_func CallNonvirtualByteMethodA
;
126 _Jv_func CallNonvirtualCharMethod
;
127 _Jv_func CallNonvirtualCharMethodV
;
128 _Jv_func CallNonvirtualCharMethodA
;
129 _Jv_func CallNonvirtualShortMethod
;
130 _Jv_func CallNonvirtualShortMethodV
;
131 _Jv_func CallNonvirtualShortMethodA
;
132 _Jv_func CallNonvirtualIntMethod
;
133 _Jv_func CallNonvirtualIntMethodV
;
134 _Jv_func CallNonvirtualIntMethodA
;
135 _Jv_func CallNonvirtualLongMethod
;
136 _Jv_func CallNonvirtualLongMethodV
;
137 _Jv_func CallNonvirtualLongMethodA
;
138 _Jv_func CallNonvirtualFloatMethod
;
139 _Jv_func CallNonvirtualFloatMethodV
;
140 _Jv_func CallNonvirtualFloatMethodA
;
141 _Jv_func CallNonvirtualDoubleMethod
;
142 jdouble (*CallNonvirtualDoubleMethodV
) (JNIEnv
*, jobject
, jclass
, jmethodID
, _Jv_va_list
);
143 _Jv_func CallNonvirtualDoubleMethodA
;
144 _Jv_func CallNonvirtualVoidMethod
;
145 _Jv_func CallNonvirtualVoidMethodV
;
146 _Jv_func CallNonvirtualVoidMethodA
;
148 jobject (*GetObjectField
) (JNIEnv
*, jobject
, jfieldID
);
149 jboolean (*GetBooleanField
) (JNIEnv
*, jobject
, jfieldID
);
150 jbyte (*GetByteField
) (JNIEnv
*, jobject
, jfieldID
);
151 jchar (*GetCharField
) (JNIEnv
*, jobject
, jfieldID
);
152 jshort (*GetShortField
) (JNIEnv
*, jobject
, jfieldID
);
153 jint (*GetIntField
) (JNIEnv
*, jobject
, jfieldID
);
154 jlong (*GetLongField
) (JNIEnv
*, jobject
, jfieldID
);
155 jfloat (*GetFloatField
) (JNIEnv
*, jobject
, jfieldID
);
156 jdouble (*GetDoubleField
) (JNIEnv
*, jobject
, jfieldID
);
157 _Jv_func SetObjectField
;
158 _Jv_func SetBooleanField
;
159 _Jv_func SetByteField
;
160 _Jv_func SetCharField
;
161 _Jv_func SetShortField
;
162 _Jv_func SetIntField
;
163 _Jv_func SetLongField
;
164 _Jv_func SetFloatField
;
165 _Jv_func SetDoubleField
;
166 _Jv_func GetStaticMethodID
;
167 _Jv_func CallStaticObjectMethod
;
168 _Jv_func CallStaticObjectMethodV
;
169 _Jv_func CallStaticObjectMethodA
;
170 _Jv_func CallStaticBooleanMethod
;
171 _Jv_func CallStaticBooleanMethodV
;
172 _Jv_func CallStaticBooleanMethodA
;
173 _Jv_func CallStaticByteMethod
;
174 _Jv_func CallStaticByteMethodV
;
175 _Jv_func CallStaticByteMethodA
;
176 _Jv_func CallStaticCharMethod
;
177 _Jv_func CallStaticCharMethodV
;
178 _Jv_func CallStaticCharMethodA
;
179 _Jv_func CallStaticShortMethod
;
180 _Jv_func CallStaticShortMethodV
;
181 _Jv_func CallStaticShortMethodA
;
182 _Jv_func CallStaticIntMethod
;
183 _Jv_func CallStaticIntMethodV
;
184 _Jv_func CallStaticIntMethodA
;
185 _Jv_func CallStaticLongMethod
;
186 _Jv_func CallStaticLongMethodV
;
187 _Jv_func CallStaticLongMethodA
;
188 _Jv_func CallStaticFloatMethod
;
189 _Jv_func CallStaticFloatMethodV
;
190 _Jv_func CallStaticFloatMethodA
;
191 _Jv_func CallStaticDoubleMethod
;
192 _Jv_func CallStaticDoubleMethodV
;
193 _Jv_func CallStaticDoubleMethodA
;
194 _Jv_func CallStaticVoidMethod
;
195 _Jv_func CallStaticVoidMethodV
;
196 _Jv_func CallStaticVoidMethodA
;
197 _Jv_func GetStaticFieldID
;
198 _Jv_func GetStaticObjectField
;
199 _Jv_func GetStaticBooleanField
;
200 _Jv_func GetStaticByteField
;
201 _Jv_func GetStaticCharField
;
202 _Jv_func GetStaticShortField
;
203 _Jv_func GetStaticIntField
;
204 _Jv_func GetStaticLongField
;
205 _Jv_func GetStaticFloatField
;
206 _Jv_func GetStaticDoubleField
;
207 _Jv_func SetStaticObjectField
;
208 _Jv_func SetStaticBooleanField
;
209 _Jv_func SetStaticByteField
;
210 _Jv_func SetStaticCharField
;
211 _Jv_func SetStaticShortField
;
212 _Jv_func SetStaticIntField
;
213 _Jv_func SetStaticLongField
;
214 _Jv_func SetStaticFloatField
;
215 _Jv_func SetStaticDoubleField
;
217 jint (*GetStringLength
) (JNIEnv
*, jstring
);
218 _Jv_func GetStringChars
;
219 _Jv_func ReleaseStringChars
;
220 _Jv_func NewStringUTF
;
221 _Jv_func GetStringUTFLength
;
222 _Jv_func GetStringUTFChars
;
223 _Jv_func ReleaseStringUTFChars
;
224 _Jv_func GetArrayLength
;
225 _Jv_func NewObjectArray
;
226 _Jv_func GetObjectArrayElement
;
227 _Jv_func SetObjectArrayElement
;
228 _Jv_func NewBooleanArray
;
229 _Jv_func NewByteArray
;
230 _Jv_func NewCharArray
;
231 _Jv_func NewShortArray
;
232 _Jv_func NewIntArray
;
233 _Jv_func NewLongArray
;
234 _Jv_func NewFloatArray
;
235 _Jv_func NewDoubleArray
;
236 _Jv_func GetBooleanArrayElements
;
237 _Jv_func GetByteArrayElements
;
238 _Jv_func GetCharArrayElements
;
239 _Jv_func GetShortArrayElements
;
240 _Jv_func GetIntArrayElements
;
241 _Jv_func GetLongArrayElements
;
242 _Jv_func GetFloatArrayElements
;
243 _Jv_func GetDoubleArrayElements
;
244 _Jv_func ReleaseBooleanArrayElements
;
245 _Jv_func ReleaseByteArrayElements
;
246 _Jv_func ReleaseCharArrayElements
;
247 _Jv_func ReleaseShortArrayElements
;
248 _Jv_func ReleaseIntArrayElements
;
249 _Jv_func ReleaseLongArrayElements
;
250 _Jv_func ReleaseFloatArrayElements
;
251 _Jv_func ReleaseDoubleArrayElements
;
252 _Jv_func GetBooleanArrayRegion
;
253 _Jv_func GetByteArrayRegion
;
254 _Jv_func GetCharArrayRegion
;
255 _Jv_func GetShortArrayRegion
;
256 _Jv_func GetIntArrayRegion
;
257 _Jv_func GetLongArrayRegion
;
258 _Jv_func GetFloatArrayRegion
;
259 _Jv_func GetDoubleArrayRegion
;
260 _Jv_func SetBooleanArrayRegion
;
261 _Jv_func SetByteArrayRegion
;
262 _Jv_func SetCharArrayRegion
;
263 _Jv_func SetShortArrayRegion
;
264 _Jv_func SetIntArrayRegion
;
265 _Jv_func SetLongArrayRegion
;
266 _Jv_func SetFloatArrayRegion
;
267 _Jv_func SetDoubleArrayRegion
;
268 _Jv_func RegisterNatives
;
269 _Jv_func UnregisterNatives
;
270 _Jv_func MonitorEnter
;
271 _Jv_func MonitorExit
;
279 struct JNINativeInterface
*p
;
281 jclass
GetSuperclass (jclass cl
);
282 jsize
GetStringLength (jstring str
);
287 _Jv_JNIEnv::GetSuperclass (jclass cl
)
288 { return p
->GetSuperclass (this, cl
); }
291 _Jv_JNIEnv::GetStringLength (jstring str
)
292 { return p
->GetStringLength (this, str
); }
296 #endif /* __GCJ_JNI_H__ */