1 // javaprims.h - Main external header file for libgcj. -*- c++ -*-
3 /* Copyright (C) 1998, 1999 Red Hat, Inc.
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 LineNumberInputStream
;
73 class LineNumberReader
;
75 class OutputStreamWriter
;
76 class PipedInputStream
;
77 class PipedOutputStream
;
82 class PushbackInputStream
;
84 class RandomAccessFile
;
86 class SequenceInputStream
;
88 class StreamTokenizer
;
89 class StringBufferInputStream
;
92 class SyncFailedException
;
93 class UTFDataFormatException
;
94 class UnsupportedEncodingException
;
100 class AbstractMethodError
;
101 class ArithmeticException
;
102 class ArrayIndexOutOfBoundsException
;
103 class ArrayStoreException
;
108 class ClassCastException
;
109 class ClassCircularityError
;
110 class ClassFormatError
;
112 class ClassNotFoundException
;
113 class CloneNotSupportedException
;
117 class ConcreteProcess
;
121 class ExceptionInInitializerError
;
124 class IllegalAccessError
;
125 class IllegalAccessException
;
126 class IllegalArgumentException
;
127 class IllegalMonitorStateException
;
128 class IllegalStateException
;
129 class IllegalThreadStateException
;
130 class IncompatibleClassChangeError
;
131 class IndexOutOfBoundsException
;
132 class InstantiationError
;
133 class InstantiationException
;
136 class InterruptedException
;
140 class NegativeArraySizeException
;
141 class NoClassDefFoundError
;
142 class NoSuchFieldError
;
143 class NoSuchFieldException
;
144 class NoSuchMethodError
;
145 class NoSuchMethodException
;
146 class NullPointerException
;
148 class NumberFormatException
;
150 class OutOfMemoryError
;
154 class RuntimeException
;
155 class SecurityException
;
156 class SecurityManager
;
158 class StackOverflowError
;
161 class StringIndexOutOfBoundsException
;
168 class UnsatisfiedLinkError
;
169 class UnsupportedOperationException
;
171 class VirtualMachineError
;
175 class AccessibleObject
;
179 class InvocationTargetException
;
190 class ConcurrentModificationException
;
193 class EmptyStackException
;
197 class GregorianCalendar
;
199 class HashtableEntry
;
200 class HashtableEnumeration
;
201 class ListResourceBundle
;
203 class MissingResourceException
;
204 class NoSuchElementException
;
208 class PropertyResourceBundle
;
210 class ResourceBundle
;
211 class SimpleTimeZone
;
213 class StringTokenizer
;
215 class TooManyListenersException
;
217 class VectorEnumeration
;
222 class JarInputStream
;
229 class CheckedInputStream
;
230 class CheckedOutputStream
;
232 class DataFormatException
;
234 class DeflaterOutputStream
;
235 class GZIPInputStream
;
236 class GZIPOutputStream
;
238 class InflaterInputStream
;
241 class ZipEnumeration
;
244 class ZipInputStream
;
245 class ZipOutputStream
;
251 typedef struct java::lang::Object
* jobject
;
252 typedef class java::lang::Class
* jclass
;
253 typedef class java::lang::Throwable
* jthrowable
;
254 typedef class java::lang::String
* jstring
;
257 typedef struct _Jv_Field
*jfieldID
;
258 typedef struct _Jv_Method
*jmethodID
;
260 extern "C" jobject
_Jv_AllocObject (jclass
, jint
) __attribute__((__malloc__
));
261 extern "C" jboolean
_Jv_IsInstanceOf(jobject
, jclass
);
262 extern "C" jstring
_Jv_AllocString(jsize
) __attribute__((__malloc__
));
263 extern "C" jstring
_Jv_NewString (const jchar
*, jsize
)
264 __attribute__((__malloc__
));
265 extern "C" jchar
* _Jv_GetStringChars (jstring str
);
266 extern "C" jint
_Jv_MonitorEnter (jobject
);
267 extern "C" jint
_Jv_MonitorExit (jobject
);
268 extern "C" jstring
_Jv_NewStringLatin1(const char*, jsize
)
269 __attribute__((__malloc__
));
270 extern "C" jsize
_Jv_GetStringUTFLength (jstring
);
271 extern "C" jsize
_Jv_GetStringUTFRegion (jstring
, jsize
, jsize
, char *);
273 extern "C" void _Jv_Throw (void *) __attribute__ ((__noreturn__
));
274 extern "C" void _Jv_Sjlj_Throw (void *) __attribute__ ((__noreturn__
));
275 extern "C" void* _Jv_Malloc (jsize
) __attribute__((__malloc__
));
276 extern "C" void _Jv_Free (void*);
278 typedef unsigned short _Jv_ushort
__attribute__((__mode__(__HI__
)));
279 typedef unsigned int _Jv_uint
__attribute__((__mode__(__SI__
)));
283 jint i
; // Also stores smaller integral types.
285 jint ia
[1]; // Half of _Jv_word2.
288 // these are things we will store in the constant
291 struct _Jv_Field
*field
;
292 struct _Jv_Utf8Const
*utf8
;
293 struct _Jv_ResolvedMethod
*rmethod
;
305 _Jv_ushort length
; /* In bytes, of data portion, without final '\0'. */
306 char data
[1]; /* In Utf8 format, with final '\0'. */
309 #endif /* __JAVAPRIMS_H__ */