1 // javaprims.h - Main external header file for libgcj. -*- c++ -*-
3 /* Copyright (C) 1998, 1999, 2000 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
11 #ifndef __JAVAPRIMS_H__
12 #define __JAVAPRIMS_H__
14 // FIXME: this is a hack until we get a proper gcjh.
15 // It is needed to work around system header files that define TRUE
22 // To force selection of correct types that will mangle consistently
26 typedef __java_byte jbyte
;
27 typedef __java_short jshort
;
28 typedef __java_int jint
;
29 typedef __java_long jlong
;
30 typedef __java_float jfloat
;
31 typedef __java_double jdouble
;
32 typedef __java_char jchar
;
33 typedef __java_boolean jboolean
;
36 // The following class declarations are automatically generated by
37 // the `classes.pl' script.
42 class BufferedInputStream
;
43 class BufferedOutputStream
;
46 class ByteArrayInputStream
;
47 class ByteArrayOutputStream
;
48 class CharArrayReader
;
49 class CharArrayWriter
;
50 class CharConversionException
;
52 class DataInputStream
;
54 class DataOutputStream
;
58 class FileInputStream
;
59 class FileNotFoundException
;
60 class FileOutputStream
;
64 class FilterInputStream
;
65 class FilterOutputStream
;
70 class InputStreamReader
;
71 class InterruptedIOException
;
72 class InvalidClassException
;
73 class InvalidObjectException
;
74 class LineNumberInputStream
;
75 class LineNumberReader
;
76 class NotActiveException
;
77 class NotSerializableException
;
79 class ObjectInputStream
;
80 class ObjectInputStream$GetField
;
81 class ObjectInputValidation
;
83 class ObjectOutputStream
;
84 class ObjectOutputStream$PutField
;
85 class ObjectStreamClass
;
86 class ObjectStreamConstants
;
87 class ObjectStreamException
;
88 class ObjectStreamField
;
89 class OptionalDataException
;
91 class OutputStreamWriter
;
92 class PipedInputStream
;
93 class PipedOutputStream
;
98 class PushbackInputStream
;
100 class RandomAccessFile
;
102 class SequenceInputStream
;
104 class SerializablePermission
;
105 class SimpleDigestStream
;
106 class StreamCorruptedException
;
107 class StreamTokenizer
;
108 class StringBufferInputStream
;
111 class SyncFailedException
;
112 class UTFDataFormatException
;
113 class UnsupportedEncodingException
;
119 class AbstractMethodError
;
120 class ArithmeticException
;
121 class ArrayIndexOutOfBoundsException
;
122 class ArrayStoreException
;
127 class ClassCastException
;
128 class ClassCircularityError
;
129 class ClassFormatError
;
131 class ClassNotFoundException
;
132 class CloneNotSupportedException
;
136 class ConcreteProcess
;
140 class ExceptionInInitializerError
;
142 class IllegalAccessError
;
143 class IllegalAccessException
;
144 class IllegalArgumentException
;
145 class IllegalMonitorStateException
;
146 class IllegalStateException
;
147 class IllegalThreadStateException
;
148 class IncompatibleClassChangeError
;
149 class IndexOutOfBoundsException
;
150 class InstantiationError
;
151 class InstantiationException
;
154 class InterruptedException
;
158 class NegativeArraySizeException
;
159 class NoClassDefFoundError
;
160 class NoSuchFieldError
;
161 class NoSuchFieldException
;
162 class NoSuchMethodError
;
163 class NoSuchMethodException
;
164 class NullPointerException
;
166 class NumberFormatException
;
168 class OutOfMemoryError
;
172 class RuntimeException
;
173 class SecurityException
;
174 class SecurityManager
;
176 class StackOverflowError
;
179 class StringIndexOutOfBoundsException
;
186 class UnsatisfiedLinkError
;
187 class UnsupportedOperationException
;
189 class VirtualMachineError
;
193 class AccessibleObject
;
197 class InvocationTargetException
;
208 class ConcurrentModificationException
;
211 class EmptyStackException
;
215 class GregorianCalendar
;
217 class HashtableEntry
;
218 class HashtableEnumeration
;
219 class ListResourceBundle
;
221 class MissingResourceException
;
222 class NoSuchElementException
;
226 class PropertyResourceBundle
;
228 class ResourceBundle
;
229 class SimpleTimeZone
;
231 class StringTokenizer
;
233 class TooManyListenersException
;
235 class VectorEnumeration
;
240 class JarInputStream
;
247 class CheckedInputStream
;
248 class CheckedOutputStream
;
250 class DataFormatException
;
252 class DeflaterOutputStream
;
253 class GZIPInputStream
;
254 class GZIPOutputStream
;
256 class InflaterInputStream
;
259 class ZipEnumeration
;
262 class ZipInputStream
;
263 class ZipOutputStream
;
269 typedef struct java::lang::Object
* jobject
;
270 typedef class java::lang::Class
* jclass
;
271 typedef class java::lang::Throwable
* jthrowable
;
272 typedef class java::lang::String
* jstring
;
275 typedef struct _Jv_Field
*jfieldID
;
276 typedef struct _Jv_Method
*jmethodID
;
278 extern "C" jobject
_Jv_AllocObject (jclass
, jint
) __attribute__((__malloc__
));
279 extern "C" jboolean
_Jv_IsInstanceOf(jobject
, jclass
);
280 extern "C" jstring
_Jv_AllocString(jsize
) __attribute__((__malloc__
));
281 extern "C" jstring
_Jv_NewString (const jchar
*, jsize
)
282 __attribute__((__malloc__
));
283 extern "C" jchar
* _Jv_GetStringChars (jstring str
);
284 extern "C" jint
_Jv_MonitorEnter (jobject
);
285 extern "C" jint
_Jv_MonitorExit (jobject
);
286 extern "C" jstring
_Jv_NewStringLatin1(const char*, jsize
)
287 __attribute__((__malloc__
));
288 extern "C" jsize
_Jv_GetStringUTFLength (jstring
);
289 extern "C" jsize
_Jv_GetStringUTFRegion (jstring
, jsize
, jsize
, char *);
291 extern "C" void _Jv_Throw (void *) __attribute__ ((__noreturn__
));
292 extern "C" void _Jv_Sjlj_Throw (void *) __attribute__ ((__noreturn__
));
293 extern "C" void* _Jv_Malloc (jsize
) __attribute__((__malloc__
));
294 extern "C" void* _Jv_Realloc (void *, jsize
);
295 extern "C" void _Jv_Free (void*);
297 typedef unsigned short _Jv_ushort
__attribute__((__mode__(__HI__
)));
298 typedef unsigned int _Jv_uint
__attribute__((__mode__(__SI__
)));
303 _Jv_ushort length
; /* In bytes, of data portion, without final '\0'. */
304 char data
[1]; /* In Utf8 format, with final '\0'. */
307 #endif /* __JAVAPRIMS_H__ */