1 // Class.h - Header file for java.lang.Class. -*- c++ -*-
3 /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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 // Written primary using compiler source and Class.java as guides.
12 #ifndef __JAVA_LANG_CLASS_H__
13 #define __JAVA_LANG_CLASS_H__
18 #include <java/lang/Object.h>
19 #include <java/lang/String.h>
20 #include <java/net/URL.h>
21 #include <java/lang/reflect/Modifier.h>
22 #include <java/security/ProtectionDomain.h>
23 #include <java/lang/Package.h>
25 // Avoid including SystemClassLoader.h.
34 class SystemClassLoader;
40 // We declare these here to avoid including gcj/cni.h.
41 extern "C" void _Jv_InitClass (jclass klass);
42 extern "C" jclass _Jv_NewClassFromInitializer
43 (const char *class_initializer);
44 extern "C" void _Jv_RegisterNewClasses (char **classes);
45 extern "C" void _Jv_RegisterClasses (const jclass *classes);
46 extern "C" void _Jv_RegisterClasses_Counted (const jclass *classes,
49 // This must be predefined with "C" linkage.
50 extern "C" void *_Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface,
52 extern "C" void *_Jv_ResolvePoolEntry (jclass this_class, jint index);
54 // These are the possible values for the `state' field of the class
55 // structure. Note that ordering is important here. Whenever the
56 // state changes, one should notify all waiters of this class.
59 JV_STATE_NOTHING = 0, // Set by compiler.
61 JV_STATE_PRELOADING = 1, // Can do _Jv_FindClass.
63 // There is an invariant through libgcj that a class will always be
64 // at a state greater than or equal to JV_STATE_LOADING when it is
65 // returned by a class loader to user code. Hence, defineclass.cc
66 // installs supers before returning a class, C++-ABI-compiled
67 // classes are created with supers installed, and BC-ABI-compiled
68 // classes are linked to this state before being returned by their
70 JV_STATE_LOADING = 3, // Has super installed.
71 JV_STATE_READ = 4, // Has been completely defined.
72 JV_STATE_LOADED = 5, // Has Miranda methods defined.
74 JV_STATE_COMPILED = 6, // This was a compiled class.
76 JV_STATE_PREPARED = 7, // Layout & static init done.
77 JV_STATE_LINKED = 9, // Strings interned.
79 JV_STATE_IN_PROGRESS = 10, // <clinit> running.
83 JV_STATE_PHANTOM = 13, // Bytecode is missing. In many cases we can
84 // work around that. If not, throw a
85 // NoClassDefFoundError.
87 JV_STATE_DONE = 14, // Must be last.
95 struct _Jv_ArrayVTable;
97 class _Jv_ExecutionEngine;
98 class _Jv_CompiledEngine;
99 class _Jv_IndirectCompiledEngine;
100 class _Jv_InterpreterEngine;
103 class _Jv_ClassReader;
104 class _Jv_InterpClass;
105 class _Jv_InterpMethod;
108 class _Jv_ClosureList
110 _Jv_ClosureList *next;
113 void registerClosure (jclass klass, void *ptr);
114 static void releaseClosures (_Jv_ClosureList **closures);
129 _Jv_Utf8Const *signature;
132 // Method's index in the vtable.
134 // Pointer to underlying function.
136 // NULL-terminated list of exception class names; can be NULL if
137 // there are none such.
138 _Jv_Utf8Const **throws;
140 _Jv_Method *getNextMethod ()
144 // The table used to resolve interface calls.
145 struct _Jv_IDispatchTable
147 // Index into interface's ioffsets.
149 jshort itable_length;
150 // Class Interface dispatch table.
154 // Used by _Jv_Linker::get_interfaces ()
162 struct _Jv_MethodSymbol
164 _Jv_Utf8Const *class_name;
166 _Jv_Utf8Const *signature;
169 struct _Jv_OffsetTable
175 struct _Jv_AddressTable
181 struct _Jv_CatchClass
183 java::lang::Class **address;
184 _Jv_Utf8Const *classname;
187 // Possible values for the assertion_code field in the type assertion table.
190 JV_ASSERT_END_OF_TABLE = 0,
191 JV_ASSERT_TYPES_COMPATIBLE = 1,
192 JV_ASSERT_IS_INSTANTIABLE = 2
195 // Entry in the type assertion table, used to validate type constraints
196 // for binary compatibility.
197 struct _Jv_TypeAssertion
214 JV_INNER_CLASSES_KIND,
215 JV_ENCLOSING_METHOD_KIND,
218 JV_PARAMETER_ANNOTATIONS_KIND,
219 JV_ANNOTATION_DEFAULT_KIND
222 #define JV_PRIMITIVE_VTABLE ((_Jv_VTable *) -1)
224 #define JV_CLASS(Obj) ((jclass) (*(_Jv_VTable **) Obj)->clas)
226 // Forward declarations for friends of java::lang::Class
228 // Friend functions implemented in natClass.cc.
229 _Jv_Method *_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
230 _Jv_Utf8Const *signature);
231 jboolean _Jv_IsAssignableFrom (jclass, jclass);
232 jboolean _Jv_IsAssignableFromSlow (jclass, jclass);
233 jboolean _Jv_InterfaceAssignableFrom (jclass, jclass);
235 _Jv_Method* _Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *,
236 _Jv_Utf8Const*, jclass * = NULL);
237 java::lang::reflect::Method *_Jv_GetReflectedMethod (jclass klass,
239 _Jv_Utf8Const *signature);
240 jfieldID JvGetFirstInstanceField (jclass);
241 jint JvNumInstanceFields (jclass);
242 jfieldID JvGetFirstStaticField (jclass);
243 jint JvNumStaticFields (jclass);
245 jobject _Jv_AllocObject (jclass);
246 void *_Jv_AllocObj (jint, jclass);
247 void *_Jv_AllocPtrFreeObj (jint, jclass);
248 void *_Jv_AllocArray (jint, jclass);
250 bool _Jv_getInterfaceMethod(jclass, jclass&, int&,
251 const _Jv_Utf8Const*,
252 const _Jv_Utf8Const*);
254 jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv *, jclass, jfieldID,
256 jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID,
258 jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);
260 jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);
261 jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);
262 jint JvNumMethods (jclass);
263 jmethodID JvGetFirstMethod (jclass);
264 _Jv_Utf8Const *_Jv_GetClassNameUtf8 (jclass);
267 // Finds a desired interpreter method in the given class or NULL if not found
268 class _Jv_MethodBase;
269 _Jv_MethodBase *_Jv_FindInterpreterMethod (jclass, jmethodID);
270 jstring _Jv_GetInterpClassSourceFile (jclass);
273 jbyte _Jv_GetClassState (jclass);
275 // Friend classes and functions to implement the ClassLoader
276 class java::lang::ClassLoader;
277 class java::lang::VMClassLoader;
279 class java::io::ObjectOutputStream;
280 class java::io::ObjectInputStream;
281 class java::io::ObjectStreamClass;
283 void _Jv_RegisterClassHookDefault (jclass klass);
284 void _Jv_RegisterInitiatingLoader (jclass,java::lang::ClassLoader*);
285 void _Jv_UnregisterInitiatingLoader (jclass,java::lang::ClassLoader*);
286 void _Jv_UnregisterClass (jclass);
287 jclass _Jv_FindClassNoException (_Jv_Utf8Const *name,
288 java::lang::ClassLoader *loader);
289 jclass _Jv_FindClass (_Jv_Utf8Const *name,
290 java::lang::ClassLoader *loader);
291 jclass _Jv_FindClassInCache (_Jv_Utf8Const *name);
292 jclass _Jv_PopClass (void);
293 void _Jv_PushClass (jclass k);
294 void _Jv_NewArrayClass (jclass element,
295 java::lang::ClassLoader *loader,
296 _Jv_VTable *array_vtable = 0);
297 jclass _Jv_NewClass (_Jv_Utf8Const *name, jclass superclass,
298 java::lang::ClassLoader *loader);
299 void _Jv_InitNewClassFields (jclass klass);
301 // Friend functions and classes in prims.cc
302 void _Jv_InitPrimClass (jclass, const char *, char, int);
303 jstring _Jv_GetMethodString (jclass, _Jv_Method *, jclass = NULL);
305 jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass,
307 jclass _Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader);
309 jboolean _Jv_IsInterpretedClass (jclass);
310 jboolean _Jv_IsBinaryCompatibilityABI (jclass);
312 jboolean _Jv_IsPhantomClass (jclass);
314 void _Jv_CopyClassesToSystemLoader (gnu::gcj::runtime::SystemClassLoader *);
317 void _Jv_InitField (jobject, jclass, int);
320 class _Jv_StackTrace;
321 class _Jv_BytecodeVerifier;
322 class java::io::VMObjectStreamClass;
324 void _Jv_sharedlib_register_hook (jclass klass);
326 /* Find the class that defines the given method. Returns NULL
327 if it cannot be found. Searches both interpreted and native
329 jclass _Jv_GetMethodDeclaringClass (jmethodID method);
331 class java::lang::Class : public java::lang::Object
334 static jclass forName (jstring className, jboolean initialize,
335 java::lang::ClassLoader *loader);
336 static jclass forName (jstring className);
337 JArray<jclass> *getClasses (void);
339 java::lang::ClassLoader *getClassLoader (void);
341 java::lang::ClassLoader *getClassLoader (jclass caller);
343 // This is an internal method that circumvents the usual security
344 // checks when getting the class loader.
345 java::lang::ClassLoader *getClassLoaderInternal (void)
350 java::lang::reflect::Constructor *getConstructor (JArray<jclass> *);
351 JArray<java::lang::reflect::Constructor *> *getConstructors (void);
352 java::lang::reflect::Constructor *getDeclaredConstructor (JArray<jclass> *);
353 JArray<java::lang::reflect::Constructor *> *getDeclaredConstructors (jboolean);
354 java::lang::reflect::Field *getDeclaredField (jstring);
355 JArray<java::lang::reflect::Field *> *getDeclaredFields ();
356 JArray<java::lang::reflect::Field *> *getDeclaredFields (jboolean);
357 java::lang::reflect::Method *getDeclaredMethod (jstring, JArray<jclass> *);
358 JArray<java::lang::reflect::Method *> *getDeclaredMethods (void);
360 JArray<jclass> *getDeclaredClasses (void);
361 JArray<jclass> *getDeclaredClasses (jboolean);
362 jclass getDeclaringClass (void);
364 java::lang::reflect::Field *getField (jstring);
366 JArray<java::lang::reflect::Field *> internalGetFields ();
367 java::lang::reflect::Field *getField (jstring, jint);
368 jint _getMethods (JArray<java::lang::reflect::Method *> *result,
370 java::lang::reflect::Field *getPrivateField (jstring);
371 java::lang::reflect::Method *getPrivateMethod (jstring, JArray<jclass> *);
372 java::security::ProtectionDomain *getProtectionDomain0 ();
374 java::lang::reflect::Method *_getMethod (jstring, JArray<jclass> *);
375 java::lang::reflect::Method *_getDeclaredMethod (jstring, JArray<jclass> *);
377 jstring getReflectionSignature (jint /*jv_attr_type*/ type,
379 jstring getReflectionSignature (::java::lang::reflect::Method *);
380 jstring getReflectionSignature (::java::lang::reflect::Constructor *);
381 jstring getReflectionSignature (::java::lang::reflect::Field *);
383 jstring getClassSignature();
384 jobject getMethodDefaultValue (::java::lang::reflect::Method *);
387 JArray<java::lang::reflect::Field *> *getFields (void);
389 JArray<jclass> *getInterfaces (void);
391 void getSignature (java::lang::StringBuffer *buffer);
392 static jstring getSignature (JArray<jclass> *, jboolean is_constructor);
393 JArray<java::lang::reflect::Method *> *getMethods (void);
395 inline jint getModifiers (void)
397 return accflags & java::lang::reflect::Modifier::ALL_FLAGS;
400 jstring getName (void);
402 java::net::URL *getResource (jstring resourceName);
403 java::io::InputStream *getResourceAsStream (jstring resourceName);
404 JArray<jobject> *getSigners (void);
405 void setSigners(JArray<jobject> *);
407 inline jclass getSuperclass (void)
412 inline jclass getInterface (jint n)
414 return interfaces[n];
417 inline jboolean isArray (void)
419 return name->first() == '[';
422 inline jclass getComponentType (void)
424 return isArray () ? element_type : 0;
427 jboolean isAssignableFrom (jclass cls);
428 jboolean isInstance (jobject obj);
430 inline jboolean isInterface (void)
432 return (accflags & java::lang::reflect::Modifier::INTERFACE) != 0;
435 inline jboolean isPrimitive (void)
437 return vtable == JV_PRIMITIVE_VTABLE;
440 jobject newInstance (void);
441 java::security::ProtectionDomain *getProtectionDomain (void);
442 java::lang::Package *getPackage (void);
443 jstring toString (void);
444 jboolean desiredAssertionStatus (void);
446 JArray<java::lang::reflect::TypeVariable *> *getTypeParameters (void);
448 jint getEnclosingMethodData(void);
449 java::lang::Class *getEnclosingClass (void);
450 java::lang::reflect::Constructor *getEnclosingConstructor (void);
451 java::lang::reflect::Method *getEnclosingMethod (void);
452 jobjectArray getDeclaredAnnotations(jint, jint, jint);
453 jobjectArray getDeclaredAnnotations(::java::lang::reflect::Method *,
455 jobjectArray getDeclaredAnnotations(::java::lang::reflect::Constructor *,
457 jobjectArray getDeclaredAnnotations(::java::lang::reflect::Field *);
458 JArray< ::java::lang::annotation::Annotation *> *getDeclaredAnnotationsInternal();
460 jboolean isEnum (void)
462 return (accflags & 0x4000) != 0;
464 jboolean isSynthetic (void)
466 return (accflags & 0x1000) != 0;
468 jboolean isAnnotation (void)
470 return (accflags & 0x2000) != 0;
473 jboolean isAnonymousClass();
474 jboolean isLocalClass();
475 jboolean isMemberClass();
477 // FIXME: this probably shouldn't be public.
480 return size_in_bytes;
483 // The index of the first method we declare ourself (as opposed to
485 inline jint firstMethodIndex (void)
487 return vtable_method_count - method_count;
493 // This constructor is used to create Class object for the primitive
494 // types. See prims.cc.
497 // Given the BC ABI version, return the size of an Class initializer.
498 static jlong initializerSize (jlong ABI)
500 unsigned long version = ABI & 0xfffff;
501 int abi_rev = version % 100;
503 // The reflection_data field was added by abi_rev 1.
505 return ((char*)(&::java::lang::Class::class$.reflection_data)
506 - (char*)&::java::lang::Class::class$);
508 return sizeof (::java::lang::Class);
511 static java::lang::Class class$;
515 void memberAccessCheck (jint flags);
517 void initializeClass (void);
519 static jstring getPackagePortion (jstring);
521 void set_state (jint nstate)
527 jint findInnerClassAttribute();
528 jint findDeclaredClasses(JArray<jclass> *, jboolean, jint);
530 // Friend functions implemented in natClass.cc.
531 friend _Jv_Method *::_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
532 _Jv_Utf8Const *signature);
533 friend jboolean (::_Jv_IsAssignableFrom) (jclass, jclass);
534 friend jboolean (::_Jv_IsAssignableFromSlow) (jclass, jclass);
535 friend jboolean (::_Jv_InterfaceAssignableFrom) (jclass, jclass);
536 friend void *::_Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface,
539 friend void ::_Jv_InitClass (jclass klass);
540 friend java::lang::Class* ::_Jv_NewClassFromInitializer (const char *class_initializer);
541 friend void _Jv_RegisterNewClasses (void **classes);
543 friend _Jv_Method* ::_Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *,
544 _Jv_Utf8Const*, jclass *);
545 friend java::lang::reflect::Method* ::_Jv_GetReflectedMethod (jclass klass,
547 _Jv_Utf8Const *signature);
548 friend jfieldID (::JvGetFirstInstanceField) (jclass);
549 friend jint (::JvNumInstanceFields) (jclass);
550 friend jfieldID (::JvGetFirstStaticField) (jclass);
551 friend jint (::JvNumStaticFields) (jclass);
553 friend jobject (::_Jv_AllocObject) (jclass);
554 friend void *::_Jv_AllocObj (jint, jclass);
555 friend void *::_Jv_AllocPtrFreeObj (jint, jclass);
556 friend void *::_Jv_AllocArray (jint, jclass);
558 friend jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv *, jclass, jfieldID,
560 friend jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID,
562 friend jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *);
564 friend jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *);
565 friend jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *);
566 friend jint (::JvNumMethods) (jclass);
567 friend jmethodID (::JvGetFirstMethod) (jclass);
568 friend _Jv_Utf8Const *::_Jv_GetClassNameUtf8 (jclass);
570 friend _Jv_MethodBase *(::_Jv_FindInterpreterMethod) (jclass klass,
571 jmethodID desired_method);
572 friend jstring ::_Jv_GetInterpClassSourceFile (jclass);
574 friend jbyte (::_Jv_GetClassState) (jclass klass);
576 // Friends classes and functions to implement the ClassLoader
577 friend class java::lang::ClassLoader;
578 friend class java::lang::VMClassLoader;
580 friend class java::io::ObjectOutputStream;
581 friend class java::io::ObjectInputStream;
582 friend class java::io::ObjectStreamClass;
584 friend void ::_Jv_RegisterClasses (const jclass *classes);
585 friend void ::_Jv_RegisterClasses_Counted (const jclass *classes,
587 friend void ::_Jv_RegisterClassHookDefault (jclass klass);
588 friend void ::_Jv_RegisterInitiatingLoader (jclass,java::lang::ClassLoader*);
589 friend void ::_Jv_UnregisterInitiatingLoader (jclass,java::lang::ClassLoader*);
590 friend void ::_Jv_UnregisterClass (jclass);
591 friend jclass (::_Jv_FindClassNoException) (_Jv_Utf8Const *name,
592 java::lang::ClassLoader *loader);
593 friend jclass (::_Jv_FindClass) (_Jv_Utf8Const *name,
594 java::lang::ClassLoader *loader);
595 friend jclass (::_Jv_FindClassInCache) (_Jv_Utf8Const *name);
596 friend jclass (::_Jv_PopClass) (void);
597 friend void ::_Jv_PushClass (jclass k);
598 friend void ::_Jv_NewArrayClass (jclass element,
599 java::lang::ClassLoader *loader,
600 _Jv_VTable *array_vtable);
601 friend jclass (::_Jv_NewClass) (_Jv_Utf8Const *name, jclass superclass,
602 java::lang::ClassLoader *loader);
603 friend void ::_Jv_InitNewClassFields (jclass klass);
606 friend void ::_Jv_InitPrimClass (jclass, const char *, char, int);
608 friend jstring (::_Jv_GetMethodString) (jclass, _Jv_Method *, jclass);
610 friend jboolean (::_Jv_CheckAccess) (jclass self_klass, jclass other_klass,
613 friend bool (::_Jv_getInterfaceMethod) (jclass, jclass&, int&,
614 const _Jv_Utf8Const*,
615 const _Jv_Utf8Const*);
617 friend jclass (::_Jv_GetArrayClass) (jclass klass,
618 java::lang::ClassLoader *loader);
620 friend jboolean (::_Jv_IsInterpretedClass) (jclass);
621 friend jboolean (::_Jv_IsBinaryCompatibilityABI) (jclass);
623 friend jboolean (::_Jv_IsPhantomClass) (jclass);
626 friend void ::_Jv_InitField (jobject, jclass, int);
628 friend class ::_Jv_ClassReader;
629 friend class ::_Jv_InterpClass;
630 friend class ::_Jv_InterpMethod;
632 friend class ::_Jv_StackTrace;
634 #ifdef JV_MARKOBJ_DECL
635 friend JV_MARKOBJ_DECL;
638 friend class ::_Jv_BytecodeVerifier;
639 friend class java::io::VMObjectStreamClass;
641 friend class ::_Jv_Linker;
642 friend class ::_Jv_ExecutionEngine;
643 friend class ::_Jv_CompiledEngine;
644 friend class ::_Jv_IndirectCompiledEngine;
645 friend class ::_Jv_InterpreterEngine;
646 friend class ::_Jv_ClosureList;
648 friend void ::_Jv_sharedlib_register_hook (jclass klass);
650 friend void *::_Jv_ResolvePoolEntry (jclass this_class, jint index);
652 friend void ::_Jv_CopyClassesToSystemLoader (gnu::gcj::runtime::SystemClassLoader *);
654 friend class java::lang::reflect::Field;
655 friend class java::lang::reflect::Method;
656 friend class java::lang::reflect::Constructor;
657 friend class java::lang::reflect::VMProxy;
659 // Chain for class pool. This also doubles as the ABI version
660 // number. It is only used for this purpose at class registration
661 // time, and only for precompiled classes.
662 jclass next_or_version;
665 // Access flags for class.
667 // The superclass, or null for Object.
670 _Jv_Constants constants;
671 // Methods. If this is an array class, then this field holds a
672 // pointer to the element type.
678 // Number of methods. If this class is primitive, this holds the
679 // character used to represent this type in a signature.
681 // Number of methods in the vtable.
682 jshort vtable_method_count;
685 // Size of instance fields, in bytes.
687 // Total number of fields (instance and static).
689 // Number of static fields.
690 jshort static_field_count;
691 // The vtbl for all objects of this class.
693 // Virtual method offset table.
694 _Jv_OffsetTable *otable;
695 // Offset table symbols.
696 _Jv_MethodSymbol *otable_syms;
698 _Jv_AddressTable *atable;
699 _Jv_MethodSymbol *atable_syms;
701 _Jv_AddressTable *itable;
702 _Jv_MethodSymbol *itable_syms;
703 _Jv_CatchClass *catch_classes;
704 // Interfaces implemented by this class.
706 // The class loader for this class.
707 java::lang::ClassLoader *loader;
708 // Number of interfaces.
709 jshort interface_count;
710 // State of this class.
712 // The thread which has locked this class. Used during class
714 java::lang::Thread *thread;
715 // How many levels of "extends" this class is removed from Object.
717 // Vector of this class's superclasses, ordered by decreasing depth.
719 // In a regular class, this field points to the Class Interface Dispatch
720 // Table. In an interface, it points to the ioffsets table.
723 _Jv_IDispatchTable *idt;
726 // Pointer to the class that represents an array of this class.
728 // Security Domain to which this class belongs (or null).
729 java::security::ProtectionDomain *protectionDomain;
730 // Pointer to the type assertion table for this class.
731 _Jv_TypeAssertion *assertion_table;
732 // Signers of this class (or null).
733 JArray<jobject> *hack_signers;
734 // Used by Jv_PopClass and _Jv_PushClass to communicate with StackTrace.
736 // Additional data, specific to the generator (JIT, native,
737 // interpreter) of this class.
740 _Jv_ExecutionEngine *engine;
742 unsigned char *reflection_data;
745 // Inline functions that are friends of java::lang::Class
747 inline void _Jv_InitClass (jclass klass)
749 if (__builtin_expect (klass->state == JV_STATE_DONE, true))
751 klass->initializeClass ();
754 // Return array class corresponding to element type KLASS, creating it if
757 _Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader)
759 extern void _Jv_NewArrayClass (jclass element,
760 java::lang::ClassLoader *loader,
761 _Jv_VTable *array_vtable = 0);
762 if (__builtin_expect (!klass->arrayclass, false))
763 _Jv_NewArrayClass (klass, loader);
764 return klass->arrayclass;
767 #endif /* __JAVA_LANG_CLASS_H__ */