1 // javaprims.h - Main external header file for libgcj. -*- c++ -*-
4 /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
5 Free Software Foundation
7 This file is part of libgcj.
9 This software is copyrighted work licensed under the terms of the
10 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
13 #ifndef __JAVAPRIMS_H__
14 #define __JAVAPRIMS_H__
16 // Force C++ compiler to use Java-style exceptions.
17 #pragma GCC java_exceptions
19 #include <gcj/libgcj-config.h>
21 // FIXME: this is a hack until we get a proper gcjh.
22 // It is needed to work around system header files that define TRUE
29 // To force selection of correct types that will mangle consistently
33 typedef __java_byte jbyte
;
34 typedef __java_short jshort
;
35 typedef __java_int jint
;
36 typedef __java_long jlong
;
37 typedef __java_float jfloat
;
38 typedef __java_double jdouble
;
39 typedef __java_char jchar
;
40 typedef __java_boolean jboolean
;
43 // The following class declarations are automatically generated by
44 // the `classes.pl' script.
49 class BufferedInputStream
;
50 class BufferedOutputStream
;
53 class ByteArrayInputStream
;
54 class ByteArrayOutputStream
;
55 class CharArrayReader
;
56 class CharArrayWriter
;
57 class CharConversionException
;
60 class DataInputStream
;
62 class DataOutputStream
;
63 class DeleteFileHelper
;
64 class DeleteFileHelper$
1;
70 class FileInputStream
;
71 class FileNotFoundException
;
72 class FileOutputStream
;
77 class FilterInputStream
;
78 class FilterOutputStream
;
84 class InputStreamReader
;
85 class InterruptedIOException
;
86 class InvalidClassException
;
87 class InvalidObjectException
;
88 class LineNumberInputStream
;
89 class LineNumberReader
;
90 class NotActiveException
;
91 class NotSerializableException
;
93 class ObjectInputStream
;
94 class ObjectInputStream$
1;
95 class ObjectInputStream$
2;
96 class ObjectInputStream$GetField
;
97 class ObjectInputStream$ValidatorAndPriority
;
98 class ObjectInputValidation
;
100 class ObjectOutputStream
;
101 class ObjectOutputStream$
1;
102 class ObjectOutputStream$PutField
;
103 class ObjectStreamClass
;
104 class ObjectStreamClass$
1;
105 class ObjectStreamClass$
2;
106 class ObjectStreamClass$InterfaceComparator
;
107 class ObjectStreamClass$MemberComparator
;
108 class ObjectStreamConstants
;
109 class ObjectStreamException
;
110 class ObjectStreamField
;
111 class ObjectStreamField$
1;
112 class OptionalDataException
;
114 class OutputStreamWriter
;
115 class PipedInputStream
;
116 class PipedOutputStream
;
121 class PushbackInputStream
;
122 class PushbackReader
;
123 class RandomAccessFile
;
125 class SequenceInputStream
;
127 class SerializablePermission
;
128 class StreamCorruptedException
;
129 class StreamTokenizer
;
130 class StringBufferInputStream
;
133 class SyncFailedException
;
134 class UTFDataFormatException
;
135 class UnsupportedEncodingException
;
136 class VMObjectInputStream
;
137 class VMObjectStreamClass
;
138 class WriteAbortedException
;
144 class AbstractMethodError
;
146 class ArithmeticException
;
147 class ArrayIndexOutOfBoundsException
;
148 class ArrayStoreException
;
149 class AssertionError
;
154 class Character$Subset
;
155 class Character$UnicodeBlock
;
157 class ClassCastException
;
158 class ClassCircularityError
;
159 class ClassFormatError
;
161 class ClassLoader$AnnotationsKey
;
162 class ClassNotFoundException
;
163 class CloneNotSupportedException
;
171 class EnumConstantNotPresentException
;
174 class ExceptionInInitializerError
;
176 class IllegalAccessError
;
177 class IllegalAccessException
;
178 class IllegalArgumentException
;
179 class IllegalMonitorStateException
;
180 class IllegalStateException
;
181 class IllegalThreadStateException
;
182 class IncompatibleClassChangeError
;
183 class IndexOutOfBoundsException
;
184 class InheritableThreadLocal
;
185 class InstantiationError
;
186 class InstantiationException
;
189 class InterruptedException
;
194 class NegativeArraySizeException
;
195 class NoClassDefFoundError
;
196 class NoSuchFieldError
;
197 class NoSuchFieldException
;
198 class NoSuchMethodError
;
199 class NoSuchMethodException
;
200 class NullPointerException
;
202 class NumberFormatException
;
204 class OutOfMemoryError
;
208 class PosixProcess$EOFInputStream
;
209 class PosixProcess$ProcessManager
;
211 class ProcessBuilder
;
215 class RuntimeException
;
216 class RuntimePermission
;
217 class SecurityException
;
218 class SecurityManager
;
219 class SecurityManager$
1;
221 class StackOverflowError
;
222 class StackTraceElement
;
225 class String$CaseInsensitiveComparator
;
228 class StringIndexOutOfBoundsException
;
229 class SuppressWarnings
;
231 class System$EnvironmentCollection
;
232 class System$EnvironmentMap
;
233 class System$EnvironmentSet
;
236 class Thread$UncaughtExceptionHandler
;
241 class Throwable$StaticData
;
242 class TypeNotPresentException
;
244 class UnsatisfiedLinkError
;
245 class UnsupportedClassVersionError
;
246 class UnsupportedOperationException
;
253 class VirtualMachineError
;
259 class AnnotationFormatError
;
260 class AnnotationTypeMismatchException
;
263 class IncompleteAnnotationException
;
266 class RetentionPolicy
;
272 class ClassDefinition
;
273 class ClassFileTransformer
;
274 class IllegalClassFormatException
;
275 class Instrumentation
;
276 class UnmodifiableClassException
;
281 class ClassLoadingMXBean
;
282 class CompilationMXBean
;
283 class GarbageCollectorMXBean
;
284 class ManagementFactory
;
285 class ManagementPermission
;
287 class MemoryManagerMXBean
;
288 class MemoryNotificationInfo
;
289 class MemoryPoolMXBean
;
292 class OperatingSystemMXBean
;
296 class VMManagementFactory
;
301 class PhantomReference
;
303 class ReferenceQueue
;
310 class AccessibleObject
;
311 class AnnotatedElement
;
315 class GenericArrayType
;
316 class GenericDeclaration
;
317 class GenericSignatureFormatError
;
318 class InvocationHandler
;
319 class InvocationTargetException
;
320 class MalformedParameterizedTypeException
;
324 class ParameterizedType
;
326 class Proxy$ClassFactory
;
327 class Proxy$ProxyData
;
328 class Proxy$ProxySignature
;
329 class Proxy$ProxyType
;
330 class ReflectPermission
;
333 class UndeclaredThrowableException
;
341 class AbstractCollection
;
343 class AbstractList$
1;
344 class AbstractList$
2;
345 class AbstractList$
3;
346 class AbstractList$RandomAccessSubList
;
347 class AbstractList$SubList
;
353 class AbstractMap$SimpleEntry
;
354 class AbstractMap$SimpleImmutableEntry
;
356 class AbstractSequentialList
;
359 class ArrayDeque$DeqIterator
;
360 class ArrayDeque$DescendingIterator
;
363 class Arrays$ArrayList
;
369 class Collections$
1$SynchronizedMapEntry
;
378 class Collections$CheckedCollection
;
379 class Collections$CheckedIterator
;
380 class Collections$CheckedList
;
381 class Collections$CheckedListIterator
;
382 class Collections$CheckedMap
;
383 class Collections$CheckedMap$CheckedEntrySet
;
384 class Collections$CheckedRandomAccessList
;
385 class Collections$CheckedSet
;
386 class Collections$CheckedSortedMap
;
387 class Collections$CheckedSortedSet
;
388 class Collections$CopiesList
;
389 class Collections$EmptyList
;
390 class Collections$EmptyMap
;
391 class Collections$EmptySet
;
392 class Collections$ReverseComparator
;
393 class Collections$SingletonList
;
394 class Collections$SingletonMap
;
395 class Collections$SingletonSet
;
396 class Collections$SynchronizedCollection
;
397 class Collections$SynchronizedIterator
;
398 class Collections$SynchronizedList
;
399 class Collections$SynchronizedListIterator
;
400 class Collections$SynchronizedMap
;
401 class Collections$SynchronizedRandomAccessList
;
402 class Collections$SynchronizedSet
;
403 class Collections$SynchronizedSortedMap
;
404 class Collections$SynchronizedSortedSet
;
405 class Collections$UnmodifiableCollection
;
406 class Collections$UnmodifiableIterator
;
407 class Collections$UnmodifiableList
;
408 class Collections$UnmodifiableListIterator
;
409 class Collections$UnmodifiableMap
;
410 class Collections$UnmodifiableMap$UnmodifiableEntrySet
;
411 class Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableMapEntry
;
412 class Collections$UnmodifiableRandomAccessList
;
413 class Collections$UnmodifiableSet
;
414 class Collections$UnmodifiableSortedMap
;
415 class Collections$UnmodifiableSortedSet
;
417 class ConcurrentModificationException
;
422 class DuplicateFormatFlagsException
;
423 class EmptyStackException
;
436 class EventListenerProxy
;
438 class FormatFlagsConversionMismatchException
;
440 class FormattableFlags
;
442 class Formatter$BigDecimalLayoutForm
;
443 class FormatterClosedException
;
444 class GregorianCalendar
;
449 class HashMap$HashEntry
;
450 class HashMap$HashIterator
;
456 class Hashtable$EntryEnumerator
;
457 class Hashtable$EntryIterator
;
458 class Hashtable$HashEntry
;
459 class Hashtable$KeyEnumerator
;
460 class Hashtable$KeyIterator
;
461 class Hashtable$ValueEnumerator
;
462 class Hashtable$ValueIterator
;
463 class IdentityHashMap
;
464 class IdentityHashMap$
1;
465 class IdentityHashMap$
2;
466 class IdentityHashMap$
3;
467 class IdentityHashMap$IdentityEntry
;
468 class IdentityHashMap$IdentityIterator
;
469 class IllegalFormatCodePointException
;
470 class IllegalFormatConversionException
;
471 class IllegalFormatException
;
472 class IllegalFormatFlagsException
;
473 class IllegalFormatPrecisionException
;
474 class IllegalFormatWidthException
;
475 class InputMismatchException
;
476 class InvalidPropertiesFormatException
;
479 class LinkedHashMap$
1;
480 class LinkedHashMap$LinkedHashEntry
;
483 class LinkedList$Entry
;
484 class LinkedList$LinkedListItr
;
487 class ListResourceBundle
;
491 class MissingFormatArgumentException
;
492 class MissingFormatWidthException
;
493 class MissingResourceException
;
496 class NoSuchElementException
;
500 class PriorityQueue$
1;
502 class PropertyPermission
;
503 class PropertyPermissionCollection
;
504 class PropertyResourceBundle
;
508 class ResourceBundle
;
509 class ResourceBundle$
1;
510 class ResourceBundle$BundleKey
;
512 class SimpleTimeZone
;
516 class StringTokenizer
;
520 class Timer$Scheduler
;
521 class Timer$TaskQueue
;
523 class TooManyListenersException
;
532 class TreeMap$SubMap
;
533 class TreeMap$TreeIterator
;
536 class UnknownFormatConversionException
;
537 class UnknownFormatFlagsException
;
544 class WeakHashMap$WeakBucket
;
545 class WeakHashMap$WeakBucket$WeakEntry
;
546 class WeakHashMap$WeakEntrySet
;
549 class AbstractExecutorService
;
550 class ArrayBlockingQueue
;
551 class ArrayBlockingQueue$Itr
;
554 class BrokenBarrierException
;
556 class CancellationException
;
557 class CompletionService
;
558 class ConcurrentHashMap
;
559 class ConcurrentHashMap$EntryIterator
;
560 class ConcurrentHashMap$EntrySet
;
561 class ConcurrentHashMap$HashEntry
;
562 class ConcurrentHashMap$HashIterator
;
563 class ConcurrentHashMap$KeyIterator
;
564 class ConcurrentHashMap$KeySet
;
565 class ConcurrentHashMap$Segment
;
566 class ConcurrentHashMap$ValueIterator
;
567 class ConcurrentHashMap$Values
;
568 class ConcurrentHashMap$WriteThroughEntry
;
569 class ConcurrentLinkedQueue
;
570 class ConcurrentLinkedQueue$Itr
;
571 class ConcurrentLinkedQueue$Node
;
573 class ConcurrentNavigableMap
;
574 class ConcurrentSkipListMap
;
575 class ConcurrentSkipListMap$ComparableUsingComparator
;
576 class ConcurrentSkipListMap$EntryIterator
;
577 class ConcurrentSkipListMap$EntrySet
;
578 class ConcurrentSkipListMap$HeadIndex
;
579 class ConcurrentSkipListMap$Index
;
580 class ConcurrentSkipListMap$Iter
;
581 class ConcurrentSkipListMap$KeyIterator
;
582 class ConcurrentSkipListMap$KeySet
;
583 class ConcurrentSkipListMap$Node
;
584 class ConcurrentSkipListMap$SubMap
;
585 class ConcurrentSkipListMap$SubMap$SubMapEntryIterator
;
586 class ConcurrentSkipListMap$SubMap$SubMapIter
;
587 class ConcurrentSkipListMap$SubMap$SubMapKeyIterator
;
588 class ConcurrentSkipListMap$SubMap$SubMapValueIterator
;
589 class ConcurrentSkipListMap$ValueIterator
;
590 class ConcurrentSkipListMap$Values
;
591 class ConcurrentSkipListSet
;
592 class CopyOnWriteArrayList
;
593 class CopyOnWriteArraySet
;
594 class CountDownLatch
;
595 class CountDownLatch$Sync
;
597 class CyclicBarrier$Generation
;
599 class DelayQueue$Itr
;
602 class Exchanger$Node
;
603 class Exchanger$Slot
;
604 class ExecutionException
;
606 class ExecutorCompletionService
;
607 class ExecutorCompletionService$QueueingFuture
;
608 class ExecutorService
;
616 class Executors$DefaultThreadFactory
;
617 class Executors$DelegatedExecutorService
;
618 class Executors$DelegatedScheduledExecutorService
;
619 class Executors$FinalizableDelegatedExecutorService
;
620 class Executors$PrivilegedCallable
;
621 class Executors$PrivilegedCallableUsingCurrentClassLoader
;
622 class Executors$PrivilegedThreadFactory
;
623 class Executors$RunnableAdapter
;
626 class FutureTask$Sync
;
627 class LinkedBlockingDeque
;
628 class LinkedBlockingDeque$AbstractItr
;
629 class LinkedBlockingDeque$DescendingItr
;
630 class LinkedBlockingDeque$Itr
;
631 class LinkedBlockingDeque$Node
;
632 class LinkedBlockingQueue
;
633 class LinkedBlockingQueue$Itr
;
634 class LinkedBlockingQueue$Node
;
635 class PriorityBlockingQueue
;
636 class PriorityBlockingQueue$Itr
;
637 class RejectedExecutionException
;
638 class RejectedExecutionHandler
;
639 class RunnableFuture
;
640 class RunnableScheduledFuture
;
641 class ScheduledExecutorService
;
642 class ScheduledFuture
;
643 class ScheduledThreadPoolExecutor
;
644 class ScheduledThreadPoolExecutor$
1;
645 class ScheduledThreadPoolExecutor$DelayedWorkQueue
;
646 class ScheduledThreadPoolExecutor$ScheduledFutureTask
;
648 class Semaphore$FairSync
;
649 class Semaphore$NonfairSync
;
650 class Semaphore$Sync
;
651 class SynchronousQueue
;
652 class SynchronousQueue$EmptyIterator
;
653 class SynchronousQueue$FifoWaitQueue
;
654 class SynchronousQueue$LifoWaitQueue
;
655 class SynchronousQueue$TransferQueue
;
656 class SynchronousQueue$TransferQueue$QNode
;
657 class SynchronousQueue$TransferStack
;
658 class SynchronousQueue$TransferStack$SNode
;
659 class SynchronousQueue$Transferer
;
660 class SynchronousQueue$WaitQueue
;
662 class ThreadPoolExecutor
;
663 class ThreadPoolExecutor$AbortPolicy
;
664 class ThreadPoolExecutor$CallerRunsPolicy
;
665 class ThreadPoolExecutor$DiscardOldestPolicy
;
666 class ThreadPoolExecutor$DiscardPolicy
;
667 class ThreadPoolExecutor$Worker
;
676 class TimeoutException
;
681 class AtomicIntegerArray
;
682 class AtomicIntegerFieldUpdater
;
683 class AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl
;
685 class AtomicLongArray
;
686 class AtomicLongFieldUpdater
;
687 class AtomicLongFieldUpdater$CASUpdater
;
688 class AtomicLongFieldUpdater$LockedUpdater
;
689 class AtomicMarkableReference
;
690 class AtomicMarkableReference$ReferenceBooleanPair
;
691 class AtomicReference
;
692 class AtomicReferenceArray
;
693 class AtomicReferenceFieldUpdater
;
694 class AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl
;
695 class AtomicStampedReference
;
696 class AtomicStampedReference$ReferenceIntegerPair
;
701 class AbstractOwnableSynchronizer
;
702 class AbstractQueuedLongSynchronizer
;
703 class AbstractQueuedLongSynchronizer$ConditionObject
;
704 class AbstractQueuedLongSynchronizer$Node
;
705 class AbstractQueuedSynchronizer
;
706 class AbstractQueuedSynchronizer$ConditionObject
;
707 class AbstractQueuedSynchronizer$Node
;
713 class ReentrantLock$FairSync
;
714 class ReentrantLock$NonfairSync
;
715 class ReentrantLock$Sync
;
716 class ReentrantReadWriteLock
;
717 class ReentrantReadWriteLock$FairSync
;
718 class ReentrantReadWriteLock$NonfairSync
;
719 class ReentrantReadWriteLock$ReadLock
;
720 class ReentrantReadWriteLock$Sync
;
721 class ReentrantReadWriteLock$Sync$HoldCounter
;
722 class ReentrantReadWriteLock$Sync$ThreadLocalHoldCounter
;
723 class ReentrantReadWriteLock$WriteLock
;
730 class Attributes$Name
;
734 class JarFile$EntryInputStream
;
735 class JarFile$JarEnumeration
;
736 class JarInputStream
;
737 class JarOutputStream
;
743 class ConsoleHandler
;
746 class FileHandler$ostr
;
757 class LoggingPermission
;
759 class SimpleFormatter
;
767 class AbstractPreferences
;
768 class AbstractPreferences$
1;
769 class AbstractPreferences$
2;
770 class BackingStoreException
;
771 class InvalidPreferencesFormatException
;
772 class NodeChangeEvent
;
773 class NodeChangeListener
;
774 class PreferenceChangeEvent
;
775 class PreferenceChangeListener
;
778 class PreferencesFactory
;
786 class PatternSyntaxException
;
793 class CheckedInputStream
;
794 class CheckedOutputStream
;
796 class DataFormatException
;
798 class DeflaterOutputStream
;
799 class GZIPInputStream
;
800 class GZIPOutputStream
;
802 class InflaterInputStream
;
808 class ZipFile$PartialInputStream
;
809 class ZipFile$ZipEntryEnumeration
;
810 class ZipInputStream
;
811 class ZipOutputStream
;
817 typedef struct java::lang::Object
* jobject
;
818 typedef class java::lang::Class
* jclass
;
819 typedef class java::lang::Throwable
* jthrowable
;
820 typedef class java::lang::String
* jstring
;
823 typedef struct _Jv_Field
*jfieldID
;
824 typedef struct _Jv_Method
*jmethodID
;
826 extern "C" jobject
_Jv_AllocObject (jclass
) __attribute__((__malloc__
));
827 extern "C" jobject
_Jv_AllocObjectNoFinalizer (jclass
) __attribute__((__malloc__
));
828 extern "C" jobject
_Jv_AllocObjectNoInitNoFinalizer (jclass
) __attribute__((__malloc__
));
829 #ifdef JV_HASH_SYNCHRONIZATION
830 extern "C" jobject
_Jv_AllocPtrFreeObject (jclass
)
831 __attribute__((__malloc__
));
833 // Collector still needs to scan sync_info
834 static inline jobject
_Jv_AllocPtrFreeObject (jclass klass
)
836 return _Jv_AllocObject(klass
);
839 extern "C" jboolean
_Jv_IsInstanceOf(jobject
, jclass
);
840 extern "C" jstring
_Jv_AllocString(jsize
) __attribute__((__malloc__
));
841 extern "C" jstring
_Jv_NewString (const jchar
*, jsize
)
842 __attribute__((__malloc__
));
843 extern jint
_Jv_FormatInt (jchar
* bufend
, jint num
);
844 extern "C" jchar
* _Jv_GetStringChars (jstring str
);
845 extern "C" void _Jv_MonitorEnter (jobject
);
846 extern "C" void _Jv_MonitorExit (jobject
);
847 extern "C" jstring
_Jv_NewStringUTF (const char *bytes
)
848 __attribute__((__malloc__
));
849 extern "C" jstring
_Jv_NewStringLatin1(const char*, jsize
)
850 __attribute__((__malloc__
));
851 extern "C" jsize
_Jv_GetStringUTFLength (jstring
);
852 extern "C" jsize
_Jv_GetStringUTFRegion (jstring
, jsize
, jsize
, char *);
853 extern "C" jint
_Jv_hashUtf8String (const char*, int);
854 extern bool _Jv_is_proxy (void *pc
);
858 // a VM initialization option
860 // extra information associated with this option
864 struct _Jv_VMInitArgs
866 // for compatibility with JavaVMInitArgs
869 // number of VM initialization options
872 // an array of VM initialization options
873 struct _Jv_VMOption
* options
;
875 // true if the option parser should ignore unrecognized options
876 jboolean ignoreUnrecognized
;
879 extern jint
_Jv_CreateJavaVM (struct _Jv_VMInitArgs
*);
882 _Jv_ThreadRun (java::lang::Thread
* thread
);
884 _Jv_AttachCurrentThread(java::lang::Thread
* thread
);
885 extern "C" java::lang::Thread
*
886 _Jv_AttachCurrentThread(jstring name
, java::lang::ThreadGroup
* group
);
887 extern "C" java::lang::Thread
*
888 _Jv_AttachCurrentThreadAsDaemon(jstring name
, java::lang::ThreadGroup
* group
);
889 extern "C" jint
_Jv_DetachCurrentThread (void);
891 extern "C" void _Jv_Throw (jthrowable
) __attribute__ ((__noreturn__
));
892 extern "C" void* _Jv_Malloc (jsize
) __attribute__((__malloc__
));
893 extern "C" void* _Jv_Realloc (void *, jsize
);
894 extern "C" void _Jv_Free (void*);
895 extern void (*_Jv_RegisterClassHook
) (jclass cl
);
896 extern "C" void _Jv_RegisterClassHookDefault (jclass
);
898 typedef unsigned short _Jv_ushort
__attribute__((__mode__(__HI__
)));
899 typedef unsigned int _Jv_uint
__attribute__((__mode__(__SI__
)));
900 typedef unsigned int _Jv_ulong
__attribute__((__mode__(__DI__
)));
902 // The type to use when treating a pointer as an integer. Similar to
904 typedef unsigned int _Jv_uintptr_t
__attribute__((__mode__(__pointer__
)));
909 _Jv_ushort length
; /* In bytes, of data portion, without final '\0'. */
910 char data
[1]; /* In Utf8 format, with final '\0'. */
912 /** Return same value of java.lang.String's hashCode. */
913 jint
hash32() { return _Jv_hashUtf8String(data
, length
); }
914 /** Return a hash code that has at least 16 bits of information. */
915 _Jv_ushort
hash16 () { return hash
; }
916 /** Return a hash code that has at least 8 bits of information. */
917 _Jv_ushort
hash8 () { return hash
; }
918 /** Length in bytes of the UTF8-encoding. */
919 _Jv_ushort
len () const { return length
; }
920 /** Pointer to the first byte in the NUL-terminated UTF8-encoding. */
921 char* chars() { return data
; }
922 /** Pointer to the NUL byte that terminated the UTF8-encoding. */
923 char* limit() { return data
+length
; }
924 /** Return the first byte in the UTF8-encoding. */
925 char first() const { return data
[0]; }
926 /** Create a (non-interned) java.lang.String from this UTF8Const. */
927 jstring
toString() { return _Jv_NewStringUTF(data
); }
928 /** Given an UTF8 string, how many bytes needed for a UTF8Const,
929 including struct header, and final NUL. I.e. what to pas to malloc. */
930 static int space_needed (const char *, int len
)
931 { return sizeof (_Jv_Utf8Const
) + len
+ 1; }
932 /** Given an allocated _Jv_Utf8Const, copy / fill it in. */
933 void init (const char *s
, int len
);
934 friend jboolean
_Jv_equalUtf8Consts (const _Jv_Utf8Const
*, const _Jv_Utf8Const
*);
935 friend jboolean
_Jv_equal (_Jv_Utf8Const
*, jstring
, jint
);
936 friend jboolean
_Jv_equaln (_Jv_Utf8Const
*, jstring
, jint
);
937 friend jboolean
_Jv_equalUtf8Classnames (const _Jv_Utf8Const
*,
938 const _Jv_Utf8Const
*);
939 friend jboolean
_Jv_isPrimitiveOrDerived (const _Jv_Utf8Const
*);
940 friend _Jv_Utf8Const
*_Jv_makeUtf8Const (const char*, int);
941 friend _Jv_Utf8Const
*_Jv_makeUtf8Const (jstring
);
942 friend jstring
_Jv_NewStringUtf8Const (_Jv_Utf8Const
*);
946 #endif /* __JAVAPRIMS_H__ */