javaprims.h: Regenerated class list.
[gcc.git] / libjava / gcj / javaprims.h
1 // javaprims.h - Main external header file for libgcj. -*- c++ -*-
2
3 /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
4
5 This file is part of libgcj.
6
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
10
11 #ifndef __JAVAPRIMS_H__
12 #define __JAVAPRIMS_H__
13
14 // Force C++ compiler to use Java-style exceptions.
15 #pragma GCC java_exceptions
16
17 #include <gcj/libgcj-config.h>
18
19 // FIXME: this is a hack until we get a proper gcjh.
20 // It is needed to work around system header files that define TRUE
21 // and FALSE.
22 #undef TRUE
23 #define TRUE TRUE
24 #undef FALSE
25 #define FALSE FALSE
26
27 // To force selection of correct types that will mangle consistently
28 // across platforms.
29 extern "Java"
30 {
31 typedef __java_byte jbyte;
32 typedef __java_short jshort;
33 typedef __java_int jint;
34 typedef __java_long jlong;
35 typedef __java_float jfloat;
36 typedef __java_double jdouble;
37 typedef __java_char jchar;
38 typedef __java_boolean jboolean;
39 typedef jint jsize;
40
41 // The following class declarations are automatically generated by
42 // the `classes.pl' script.
43 namespace java
44 {
45 namespace io
46 {
47 class BufferedInputStream;
48 class BufferedOutputStream;
49 class BufferedReader;
50 class BufferedWriter;
51 class ByteArrayInputStream;
52 class ByteArrayOutputStream;
53 class CharArrayReader;
54 class CharArrayWriter;
55 class CharConversionException;
56 class DataInput;
57 class DataInputStream;
58 class DataOutput;
59 class DataOutputStream;
60 class EOFException;
61 class Externalizable;
62 class File;
63 class FileDescriptor;
64 class FileFilter;
65 class FileInputStream;
66 class FileNotFoundException;
67 class FileOutputStream;
68 class FilePermission;
69 class FileReader;
70 class FileWriter;
71 class FilenameFilter;
72 class FilterInputStream;
73 class FilterOutputStream;
74 class FilterReader;
75 class FilterWriter;
76 class IOException;
77 class InputStream;
78 class InputStreamReader;
79 class InterfaceComparator;
80 class InterruptedIOException;
81 class InvalidClassException;
82 class InvalidObjectException;
83 class LineNumberInputStream;
84 class LineNumberReader;
85 class MemberComparator;
86 class NotActiveException;
87 class NotSerializableException;
88 class ObjectInput;
89 class ObjectInputStream;
90 class ObjectInputStream$GetField;
91 class ObjectInputValidation;
92 class ObjectOutput;
93 class ObjectOutputStream;
94 class ObjectOutputStream$PutField;
95 class ObjectStreamClass;
96 class ObjectStreamConstants;
97 class ObjectStreamException;
98 class ObjectStreamField;
99 class OptionalDataException;
100 class OutputStream;
101 class OutputStreamWriter;
102 class PipedInputStream;
103 class PipedOutputStream;
104 class PipedReader;
105 class PipedWriter;
106 class PrintStream;
107 class PrintWriter;
108 class PushbackInputStream;
109 class PushbackReader;
110 class RandomAccessFile;
111 class Reader;
112 class SequenceInputStream;
113 class Serializable;
114 class SerializablePermission;
115 class StreamCorruptedException;
116 class StreamTokenizer;
117 class StringBufferInputStream;
118 class StringReader;
119 class StringWriter;
120 class SyncFailedException;
121 class UTFDataFormatException;
122 class UnsupportedEncodingException;
123 class ValidatorAndPriority;
124 class WriteAbortedException;
125 class Writer;
126 };
127
128 namespace lang
129 {
130 class AbstractMethodError;
131 class ArithmeticException;
132 class ArrayIndexOutOfBoundsException;
133 class ArrayStoreException;
134 class Boolean;
135 class Byte;
136 class CPlusPlusDemangler;
137 class Character;
138 class Character$Subset;
139 class Character$UnicodeBlock;
140 class Class;
141 class ClassCastException;
142 class ClassCircularityError;
143 class ClassFormatError;
144 class ClassLoader;
145 class ClassNotFoundException;
146 class CloneNotSupportedException;
147 class Cloneable;
148 class Comparable;
149 class Compiler;
150 class ConcreteProcess;
151 class Double;
152 class Error;
153 class Exception;
154 class ExceptionInInitializerError;
155 class Float;
156 class IllegalAccessError;
157 class IllegalAccessException;
158 class IllegalArgumentException;
159 class IllegalMonitorStateException;
160 class IllegalStateException;
161 class IllegalThreadStateException;
162 class IncompatibleClassChangeError;
163 class IndexOutOfBoundsException;
164 class InstantiationError;
165 class InstantiationException;
166 class Integer;
167 class InternalError;
168 class InterruptedException;
169 class LinkageError;
170 class Long;
171 class Math;
172 class NegativeArraySizeException;
173 class NoClassDefFoundError;
174 class NoSuchFieldError;
175 class NoSuchFieldException;
176 class NoSuchMethodError;
177 class NoSuchMethodException;
178 class NullPointerException;
179 class Number;
180 class NumberFormatException;
181 class Object;
182 class OutOfMemoryError;
183 class Package;
184 class Process;
185 class Runnable;
186 class Runtime;
187 class RuntimeException;
188 class RuntimePermission;
189 class SecurityContext;
190 class SecurityException;
191 class SecurityManager;
192 class Short;
193 class StackOverflowError;
194 class String;
195 class StringBuffer;
196 class StringIndexOutOfBoundsException;
197 class System;
198 class Thread;
199 class ThreadDeath;
200 class ThreadGroup;
201 class ThreadLocal;
202 class ThreadLocal$Value;
203 class Throwable;
204 class UnknownError;
205 class UnsatisfiedLinkError;
206 class UnsupportedClassVersionError;
207 class UnsupportedOperationException;
208 class VMClassLoader;
209 class VMSecurityManager;
210 class VerifyError;
211 class VirtualMachineError;
212 class Void;
213 namespace ref
214 {
215 class PhantomReference;
216 class Reference;
217 class ReferenceQueue;
218 class SoftReference;
219 class WeakReference;
220 };
221
222 namespace reflect
223 {
224 class AccessibleObject;
225 class Array;
226 class Constructor;
227 class Field;
228 class InvocationTargetException;
229 class Member;
230 class Method;
231 class Modifier;
232 class ReflectPermission;
233 };
234 };
235
236 namespace util
237 {
238 class AbstractCollection;
239 class AbstractList;
240 class AbstractList$AbstractListItr;
241 class AbstractMap;
242 class AbstractSequentialList;
243 class AbstractSet;
244 class ArrayList;
245 class Arrays;
246 class Arrays$ListImpl;
247 class BasicMapEntry;
248 class BitSet;
249 class Calendar;
250 class Collection;
251 class Collections;
252 class Collections$ReverseComparator;
253 class Collections$SynchronizedCollection;
254 class Collections$SynchronizedIterator;
255 class Collections$SynchronizedList;
256 class Collections$SynchronizedListIterator;
257 class Collections$SynchronizedMap;
258 class Collections$SynchronizedSet;
259 class Collections$SynchronizedSortedMap;
260 class Collections$SynchronizedSortedSet;
261 class Collections$UnmodifiableCollection;
262 class Collections$UnmodifiableIterator;
263 class Collections$UnmodifiableList;
264 class Collections$UnmodifiableListIterator;
265 class Collections$UnmodifiableMap;
266 class Collections$UnmodifiableSet;
267 class Collections$UnmodifiableSortedMap;
268 class Collections$UnmodifiableSortedSet;
269 class Comparator;
270 class ConcurrentModificationException;
271 class Date;
272 class Dictionary;
273 class EmptyStackException;
274 class Enumeration;
275 class EventListener;
276 class EventObject;
277 class GregorianCalendar;
278 class HashMap;
279 class HashMap$Entry;
280 class HashMap$HashIterator;
281 class HashSet;
282 class Hashtable;
283 class Hashtable$Entry;
284 class Hashtable$Enumerator;
285 class Hashtable$HashIterator;
286 class IdentityHashMap;
287 class IdentityHashMap$IdentityIterator;
288 class Iterator;
289 class LinkedList;
290 class LinkedList$Entry;
291 class LinkedList$LinkedListItr;
292 class List;
293 class ListIterator;
294 class ListResourceBundle;
295 class Locale;
296 class Map;
297 class Map$Entry;
298 class MissingResourceException;
299 class NoSuchElementException;
300 class Observable;
301 class Observer;
302 class Properties;
303 class PropertyPermission;
304 class PropertyResourceBundle;
305 class Random;
306 class ResourceBundle;
307 class Set;
308 class SimpleTimeZone;
309 class SortedMap;
310 class SortedSet;
311 class Stack;
312 class StringTokenizer;
313 class SubList;
314 class TimeZone;
315 class Timer;
316 class Timer$Scheduler;
317 class Timer$TaskQueue;
318 class TimerTask;
319 class TooManyListenersException;
320 class TreeMap;
321 class TreeMap$Node;
322 class TreeMap$SubMap;
323 class TreeMap$TreeIterator;
324 class TreeMap$VerifyResult;
325 class TreeSet;
326 class Vector;
327 class WeakHashMap;
328 class WeakHashMap$Entry;
329 class WeakHashMap$WeakBucket;
330 class WeakHashMap$WeakEntrySet;
331 namespace jar
332 {
333 class Attributes;
334 class Attributes$Name;
335 class JarEntry;
336 class JarException;
337 class JarFile;
338 class JarFile$JarEnumeration;
339 class JarInputStream;
340 class JarOutputStream;
341 class Manifest;
342 };
343
344 namespace zip
345 {
346 class Adler32;
347 class CRC32;
348 class CheckedInputStream;
349 class CheckedOutputStream;
350 class Checksum;
351 class DataFormatException;
352 class Deflater;
353 class DeflaterOutputStream;
354 class GZIPInputStream;
355 class GZIPOutputStream;
356 class Inflater;
357 class InflaterInputStream;
358 class ZipConstants;
359 class ZipEntry;
360 class ZipEnumeration;
361 class ZipException;
362 class ZipFile;
363 class ZipInputStream;
364 class ZipOutputStream;
365 };
366 };
367 };
368 };
369
370 typedef struct java::lang::Object* jobject;
371 typedef class java::lang::Class* jclass;
372 typedef class java::lang::Throwable* jthrowable;
373 typedef class java::lang::String* jstring;
374 struct _Jv_JNIEnv;
375
376 typedef struct _Jv_Field *jfieldID;
377 typedef struct _Jv_Method *jmethodID;
378
379 extern "C" jobject _Jv_AllocObject (jclass, jint) __attribute__((__malloc__));
380 #ifdef JV_HASH_SYNCHRONIZATION
381 extern "C" jobject _Jv_AllocPtrFreeObject (jclass, jint)
382 __attribute__((__malloc__));
383 #else
384 // Collector still needs to scan sync_info
385 static inline jobject _Jv_AllocPtrFreeObject (jclass klass, jint sz)
386 {
387 return _Jv_AllocObject(klass, sz);
388 }
389 #endif
390 extern "C" jboolean _Jv_IsInstanceOf(jobject, jclass);
391 extern "C" jstring _Jv_AllocString(jsize) __attribute__((__malloc__));
392 extern "C" jstring _Jv_NewString (const jchar*, jsize)
393 __attribute__((__malloc__));
394 extern jint _Jv_FormatInt (jchar* bufend, jint num);
395 extern "C" jchar* _Jv_GetStringChars (jstring str);
396 extern "C" void _Jv_MonitorEnter (jobject);
397 extern "C" void _Jv_MonitorExit (jobject);
398 extern "C" jstring _Jv_NewStringLatin1(const char*, jsize)
399 __attribute__((__malloc__));
400 extern "C" jsize _Jv_GetStringUTFLength (jstring);
401 extern "C" jsize _Jv_GetStringUTFRegion (jstring, jsize, jsize, char *);
402
403 extern jint _Jv_CreateJavaVM (void* /*vm_args*/);
404
405 void
406 _Jv_ThreadRun (java::lang::Thread* thread);
407 jint
408 _Jv_AttachCurrentThread(java::lang::Thread* thread);
409 extern "C" java::lang::Thread*
410 _Jv_AttachCurrentThread(jstring name, java::lang::ThreadGroup* group);
411 extern "C" jint _Jv_DetachCurrentThread (void);
412
413 extern "C" void _Jv_Throw (jthrowable) __attribute__ ((__noreturn__));
414 extern "C" void* _Jv_Malloc (jsize) __attribute__((__malloc__));
415 extern "C" void* _Jv_Realloc (void *, jsize);
416 extern "C" void _Jv_Free (void*);
417 extern void (*_Jv_RegisterClassHook) (jclass cl);
418 extern "C" void _Jv_RegisterClassHookDefault (jclass);
419
420 typedef unsigned short _Jv_ushort __attribute__((__mode__(__HI__)));
421 typedef unsigned int _Jv_uint __attribute__((__mode__(__SI__)));
422
423 struct _Jv_Utf8Const
424 {
425 _Jv_ushort hash;
426 _Jv_ushort length; /* In bytes, of data portion, without final '\0'. */
427 char data[1]; /* In Utf8 format, with final '\0'. */
428 };
429
430
431 #endif /* __JAVAPRIMS_H__ */