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 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;
123 class IllegalAccessError;
124 class IllegalAccessException;
125 class IllegalArgumentException;
126 class IllegalMonitorStateException;
127 class IllegalStateException;
128 class IllegalThreadStateException;
129 class IncompatibleClassChangeError;
130 class IndexOutOfBoundsException;
131 class InstantiationError;
132 class InstantiationException;
135 class InterruptedException;
139 class NegativeArraySizeException;
140 class NoClassDefFoundError;
141 class NoSuchFieldError;
142 class NoSuchFieldException;
143 class NoSuchMethodError;
144 class NoSuchMethodException;
145 class NullPointerException;
147 class NumberFormatException;
149 class OutOfMemoryError;
153 class RuntimeException;
154 class SecurityException;
155 class SecurityManager;
157 class StackOverflowError;
160 class StringIndexOutOfBoundsException;
167 class UnsatisfiedLinkError;
168 class UnsupportedOperationException;
170 class VirtualMachineError;
174 class AccessibleObject;
178 class InvocationTargetException;
189 class ConcurrentModificationException;
192 class EmptyStackException;
196 class GregorianCalendar;
198 class HashtableEntry;
199 class HashtableEnumeration;
200 class ListResourceBundle;
202 class MissingResourceException;
203 class NoSuchElementException;
207 class PropertyResourceBundle;
209 class ResourceBundle;
210 class SimpleTimeZone;
212 class StringTokenizer;
214 class TooManyListenersException;
216 class VectorEnumeration;
221 class JarInputStream;
228 class CheckedInputStream;
229 class CheckedOutputStream;
231 class DataFormatException;
233 class DeflaterOutputStream;
234 class GZIPInputStream;
235 class GZIPOutputStream;
237 class InflaterInputStream;
240 class ZipEnumeration;
243 class ZipInputStream;
244 class ZipOutputStream;
250 typedef struct java::lang::Object* jobject;
251 typedef class java::lang::Class* jclass;
252 typedef class java::lang::Throwable* jthrowable;
253 typedef class java::lang::String* jstring;
256 typedef struct _Jv_Field *jfieldID;
257 typedef struct _Jv_Method *jmethodID;
259 extern "C" jobject _Jv_AllocObject (jclass, jint) __attribute__((__malloc__));
260 extern "C" jboolean _Jv_IsInstanceOf(jobject, jclass);
261 extern "C" jstring _Jv_AllocString(jsize) __attribute__((__malloc__));
262 extern "C" jstring _Jv_NewString (const jchar*, jsize)
263 __attribute__((__malloc__));
264 extern "C" jchar* _Jv_GetStringChars (jstring str);
265 extern "C" jint _Jv_MonitorEnter (jobject);
266 extern "C" jint _Jv_MonitorExit (jobject);
267 extern "C" jstring _Jv_NewStringLatin1(const char*, jsize)
268 __attribute__((__malloc__));
269 extern "C" jsize _Jv_GetStringUTFLength (jstring);
270 extern "C" jsize _Jv_GetStringUTFRegion (jstring, jsize, jsize, char *);
272 extern "C" void _Jv_Throw (void *) __attribute__ ((__noreturn__));
273 extern "C" void _Jv_Sjlj_Throw (void *) __attribute__ ((__noreturn__));
274 extern "C" void* _Jv_Malloc (jsize) __attribute__((__malloc__));
275 extern "C" void* _Jv_Realloc (void *, jsize);
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__)));
284 _Jv_ushort length; /* In bytes, of data portion, without final '\0'. */
285 char data[1]; /* In Utf8 format, with final '\0'. */
288 #endif /* __JAVAPRIMS_H__ */