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 // Force C++ compiler to use Java-style exceptions.
15 #pragma GCC java_exceptions
17 // FIXME: this is a hack until we get a proper gcjh.
18 // It is needed to work around system header files that define TRUE
25 // To force selection of correct types that will mangle consistently
29 typedef __java_byte jbyte
;
30 typedef __java_short jshort
;
31 typedef __java_int jint
;
32 typedef __java_long jlong
;
33 typedef __java_float jfloat
;
34 typedef __java_double jdouble
;
35 typedef __java_char jchar
;
36 typedef __java_boolean jboolean
;
39 // The following class declarations are automatically generated by
40 // the `classes.pl' script.
45 class BufferedInputStream
;
46 class BufferedOutputStream
;
49 class ByteArrayInputStream
;
50 class ByteArrayOutputStream
;
51 class CharArrayReader
;
52 class CharArrayWriter
;
53 class CharConversionException
;
55 class DataInputStream
;
57 class DataOutputStream
;
63 class FileInputStream
;
64 class FileNotFoundException
;
65 class FileOutputStream
;
70 class FilterInputStream
;
71 class FilterOutputStream
;
76 class InputStreamReader
;
77 class InterfaceComparator
;
78 class InterruptedIOException
;
79 class InvalidClassException
;
80 class InvalidObjectException
;
81 class LineNumberInputStream
;
82 class LineNumberReader
;
83 class MemberComparator
;
84 class NotActiveException
;
85 class NotSerializableException
;
87 class ObjectInputStream
;
88 class ObjectInputStream$GetField
;
89 class ObjectInputValidation
;
91 class ObjectOutputStream
;
92 class ObjectOutputStream$PutField
;
93 class ObjectStreamClass
;
94 class ObjectStreamConstants
;
95 class ObjectStreamException
;
96 class ObjectStreamField
;
97 class OptionalDataException
;
99 class OutputStreamWriter
;
100 class PipedInputStream
;
101 class PipedOutputStream
;
106 class PushbackInputStream
;
107 class PushbackReader
;
108 class RandomAccessFile
;
110 class SequenceInputStream
;
112 class SerializablePermission
;
113 class StreamCorruptedException
;
114 class StreamTokenizer
;
115 class StringBufferInputStream
;
118 class SyncFailedException
;
119 class UTFDataFormatException
;
120 class UnsupportedEncodingException
;
121 class ValidatorAndPriority
;
122 class WriteAbortedException
;
128 class AbstractMethodError
;
129 class ArithmeticException
;
130 class ArrayIndexOutOfBoundsException
;
131 class ArrayStoreException
;
134 class CPlusPlusDemangler
;
136 class Character$Subset
;
137 class Character$UnicodeBlock
;
139 class ClassCastException
;
140 class ClassCircularityError
;
141 class ClassFormatError
;
143 class ClassNotFoundException
;
144 class CloneNotSupportedException
;
148 class ConcreteProcess
;
152 class ExceptionInInitializerError
;
154 class IllegalAccessError
;
155 class IllegalAccessException
;
156 class IllegalArgumentException
;
157 class IllegalMonitorStateException
;
158 class IllegalStateException
;
159 class IllegalThreadStateException
;
160 class IncompatibleClassChangeError
;
161 class IndexOutOfBoundsException
;
162 class InstantiationError
;
163 class InstantiationException
;
166 class InterruptedException
;
170 class NegativeArraySizeException
;
171 class NoClassDefFoundError
;
172 class NoSuchFieldError
;
173 class NoSuchFieldException
;
174 class NoSuchMethodError
;
175 class NoSuchMethodException
;
176 class NullPointerException
;
178 class NumberFormatException
;
180 class OutOfMemoryError
;
185 class RuntimeException
;
186 class RuntimePermission
;
187 class SecurityException
;
188 class SecurityManager
;
190 class StackOverflowError
;
193 class StringIndexOutOfBoundsException
;
200 class UnsatisfiedLinkError
;
201 class UnsupportedOperationException
;
203 class VirtualMachineError
;
207 class PhantomReference
;
209 class ReferenceQueue
;
216 class AccessibleObject
;
220 class InvocationTargetException
;
224 class ReflectPermission
;
230 class AbstractCollection
;
232 class AbstractList$AbstractListItr
;
234 class AbstractSequentialList
;
238 class Arrays$ListImpl
;
244 class Collections$ReverseComparator
;
245 class Collections$SynchronizedCollection
;
246 class Collections$SynchronizedIterator
;
247 class Collections$SynchronizedList
;
248 class Collections$SynchronizedListIterator
;
249 class Collections$SynchronizedMap
;
250 class Collections$SynchronizedSet
;
251 class Collections$SynchronizedSortedMap
;
252 class Collections$SynchronizedSortedSet
;
253 class Collections$UnmodifiableCollection
;
254 class Collections$UnmodifiableIterator
;
255 class Collections$UnmodifiableList
;
256 class Collections$UnmodifiableListIterator
;
257 class Collections$UnmodifiableMap
;
258 class Collections$UnmodifiableSet
;
259 class Collections$UnmodifiableSortedMap
;
260 class Collections$UnmodifiableSortedSet
;
262 class ConcurrentModificationException
;
265 class EmptyStackException
;
269 class GregorianCalendar
;
272 class HashMap$HashIterator
;
275 class Hashtable$Entry
;
276 class Hashtable$Enumerator
;
277 class Hashtable$HashIterator
;
280 class LinkedList$Entry
;
281 class LinkedList$LinkedListItr
;
284 class ListResourceBundle
;
288 class MissingResourceException
;
289 class NoSuchElementException
;
293 class PropertyPermission
;
294 class PropertyResourceBundle
;
296 class ResourceBundle
;
298 class SimpleTimeZone
;
302 class StringTokenizer
;
306 class Timer$Scheduler
;
307 class Timer$TaskQueue
;
309 class TooManyListenersException
;
312 class TreeMap$SubMap
;
313 class TreeMap$TreeIterator
;
314 class TreeMap$VerifyResult
;
318 class WeakHashMap$Entry
;
319 class WeakHashMap$WeakBucket
;
320 class WeakHashMap$WeakEntrySet
;
324 class Attributes$Name
;
328 class JarFile$JarEnumeration
;
329 class JarInputStream
;
330 class JarOutputStream
;
338 class CheckedInputStream
;
339 class CheckedOutputStream
;
341 class DataFormatException
;
343 class DeflaterOutputStream
;
344 class GZIPInputStream
;
345 class GZIPOutputStream
;
347 class InflaterInputStream
;
350 class ZipEnumeration
;
353 class ZipInputStream
;
354 class ZipOutputStream
;
360 typedef struct java::lang::Object
* jobject
;
361 typedef class java::lang::Class
* jclass
;
362 typedef class java::lang::Throwable
* jthrowable
;
363 typedef class java::lang::String
* jstring
;
366 typedef struct _Jv_Field
*jfieldID
;
367 typedef struct _Jv_Method
*jmethodID
;
369 extern "C" jobject
_Jv_AllocObject (jclass
, jint
) __attribute__((__malloc__
));
370 extern "C" jboolean
_Jv_IsInstanceOf(jobject
, jclass
);
371 extern "C" jstring
_Jv_AllocString(jsize
) __attribute__((__malloc__
));
372 extern "C" jstring
_Jv_NewString (const jchar
*, jsize
)
373 __attribute__((__malloc__
));
374 extern "C" jchar
* _Jv_GetStringChars (jstring str
);
375 extern "C" jint
_Jv_MonitorEnter (jobject
);
376 extern "C" jint
_Jv_MonitorExit (jobject
);
377 extern "C" jstring
_Jv_NewStringLatin1(const char*, jsize
)
378 __attribute__((__malloc__
));
379 extern "C" jsize
_Jv_GetStringUTFLength (jstring
);
380 extern "C" jsize
_Jv_GetStringUTFRegion (jstring
, jsize
, jsize
, char *);
382 extern "C" void _Jv_Throw (jthrowable
) __attribute__ ((__noreturn__
));
383 extern "C" void* _Jv_Malloc (jsize
) __attribute__((__malloc__
));
384 extern "C" void* _Jv_Realloc (void *, jsize
);
385 extern "C" void _Jv_Free (void*);
387 typedef unsigned short _Jv_ushort
__attribute__((__mode__(__HI__
)));
388 typedef unsigned int _Jv_uint
__attribute__((__mode__(__SI__
)));
393 _Jv_ushort length
; /* In bytes, of data portion, without final '\0'. */
394 char data
[1]; /* In Utf8 format, with final '\0'. */
397 #endif /* __JAVAPRIMS_H__ */