+static bool initClassReferences(void) {
+ static struct { ClassObject** ref; const char* name; } classes[] = {
+
+ /* The corest of the core classes */
+ { &gDvm.classJavaLangClass, "Ljava/lang/Class;" },
+ { &gDvm.classJavaLangObject, "Ljava/lang/Object;" },
+ { &gDvm.exThrowable, "Ljava/lang/Throwable;" },
+
+ /* Slightly less core, but still down there, classes */
+ { &gDvm.classJavaLangClassArray, "[Ljava/lang/Class;" },
+ { &gDvm.classJavaLangObjectArray, "[Ljava/lang/Object;"},
+ { &gDvm.classJavaLangStackTraceElement, "Ljava/lang/StackTraceElement;" },
+ { &gDvm.classJavaLangStackTraceElementArray, "[Ljava/lang/StackTraceElement;" },
+ { &gDvm.classJavaLangString, "Ljava/lang/String;" },
+ { &gDvm.classJavaLangThread, "Ljava/lang/Thread;" },
+ { &gDvm.classJavaLangThreadGroup, "Ljava/lang/ThreadGroup;" },
+ { &gDvm.classJavaLangVMThread, "Ljava/lang/VMThread;" },
+
+ /* Arrays of primitive types */
+ { &gDvm.classArrayBoolean, "[Z" },
+ { &gDvm.classArrayByte, "[B" },
+ { &gDvm.classArrayShort, "[S" },
+ { &gDvm.classArrayChar, "[C" },
+ { &gDvm.classArrayInt, "[I" },
+ { &gDvm.classArrayLong, "[J" },
+ { &gDvm.classArrayFloat, "[F" },
+ { &gDvm.classArrayDouble, "[D" },
+
+ /* Exception classes */
+ { &gDvm.exAbstractMethodError, "Ljava/lang/AbstractMethodError;" },
+ { &gDvm.exArithmeticException, "Ljava/lang/ArithmeticException;" },
+ { &gDvm.exArrayIndexOutOfBoundsException, "Ljava/lang/ArrayIndexOutOfBoundsException;" },
+ { &gDvm.exArrayStoreException, "Ljava/lang/ArrayStoreException;" },
+ { &gDvm.exClassCastException, "Ljava/lang/ClassCastException;" },
+ { &gDvm.exClassCircularityError, "Ljava/lang/ClassCircularityError;" },
+ { &gDvm.exClassNotFoundException, "Ljava/lang/ClassNotFoundException;" },
+ { &gDvm.exClassFormatError, "Ljava/lang/ClassFormatError;" },
+ { &gDvm.exError, "Ljava/lang/Error;" },
+ { &gDvm.exExceptionInInitializerError, "Ljava/lang/ExceptionInInitializerError;" },
+ { &gDvm.exFileNotFoundException, "Ljava/io/FileNotFoundException;" },
+ { &gDvm.exIOException, "Ljava/io/IOException;" },
+ { &gDvm.exIllegalAccessError, "Ljava/lang/IllegalAccessError;" },
+ { &gDvm.exIllegalAccessException, "Ljava/lang/IllegalAccessException;" },
+ { &gDvm.exIllegalArgumentException, "Ljava/lang/IllegalArgumentException;" },
+ { &gDvm.exIllegalMonitorStateException, "Ljava/lang/IllegalMonitorStateException;" },
+ { &gDvm.exIllegalStateException, "Ljava/lang/IllegalStateException;" },
+ { &gDvm.exIllegalThreadStateException, "Ljava/lang/IllegalThreadStateException;" },
+ { &gDvm.exIncompatibleClassChangeError, "Ljava/lang/IncompatibleClassChangeError;" },
+ { &gDvm.exInstantiationError, "Ljava/lang/InstantiationError;" },
+ { &gDvm.exInstantiationException, "Ljava/lang/InstantiationException;" },
+ { &gDvm.exInternalError, "Ljava/lang/InternalError;" },
+ { &gDvm.exInterruptedException, "Ljava/lang/InterruptedException;" },
+ { &gDvm.exLinkageError, "Ljava/lang/LinkageError;" },
+ { &gDvm.exNegativeArraySizeException, "Ljava/lang/NegativeArraySizeException;" },
+ { &gDvm.exNoClassDefFoundError, "Ljava/lang/NoClassDefFoundError;" },
+ { &gDvm.exNoSuchFieldError, "Ljava/lang/NoSuchFieldError;" },
+ { &gDvm.exNoSuchFieldException, "Ljava/lang/NoSuchFieldException;" },
+ { &gDvm.exNoSuchMethodError, "Ljava/lang/NoSuchMethodError;" },
+ { &gDvm.exNullPointerException, "Ljava/lang/NullPointerException;" },
+ { &gDvm.exOutOfMemoryError, "Ljava/lang/OutOfMemoryError;" },
+ { &gDvm.exRuntimeException, "Ljava/lang/RuntimeException;" },
+ { &gDvm.exStackOverflowError, "Ljava/lang/StackOverflowError;" },
+ { &gDvm.exStaleDexCacheError, "Ldalvik/system/StaleDexCacheError;" },
+ { &gDvm.exStringIndexOutOfBoundsException, "Ljava/lang/StringIndexOutOfBoundsException;" },
+ { &gDvm.exTypeNotPresentException, "Ljava/lang/TypeNotPresentException;" },
+ { &gDvm.exUnsatisfiedLinkError, "Ljava/lang/UnsatisfiedLinkError;" },
+ { &gDvm.exUnsupportedOperationException, "Ljava/lang/UnsupportedOperationException;" },
+ { &gDvm.exVerifyError, "Ljava/lang/VerifyError;" },
+ { &gDvm.exVirtualMachineError, "Ljava/lang/VirtualMachineError;" },
+
+ /* Other classes */
+ { &gDvm.classJavaLangAnnotationAnnotationArray, "[Ljava/lang/annotation/Annotation;" },
+ { &gDvm.classJavaLangAnnotationAnnotationArrayArray,
+ "[[Ljava/lang/annotation/Annotation;" },
+ { &gDvm.classJavaLangReflectAccessibleObject, "Ljava/lang/reflect/AccessibleObject;" },
+ { &gDvm.classJavaLangReflectConstructor, "Ljava/lang/reflect/Constructor;" },
+ { &gDvm.classJavaLangReflectConstructorArray, "[Ljava/lang/reflect/Constructor;" },
+ { &gDvm.classJavaLangReflectField, "Ljava/lang/reflect/Field;" },
+ { &gDvm.classJavaLangReflectFieldArray, "[Ljava/lang/reflect/Field;" },
+ { &gDvm.classJavaLangReflectMethod, "Ljava/lang/reflect/Method;" },
+ { &gDvm.classJavaLangReflectMethodArray, "[Ljava/lang/reflect/Method;"},
+ { &gDvm.classJavaLangReflectProxy, "Ljava/lang/reflect/Proxy;" },
+ { &gDvm.classJavaNioReadWriteDirectByteBuffer, "Ljava/nio/ReadWriteDirectByteBuffer;" },
+ { &gDvm.classOrgApacheHarmonyLangAnnotationAnnotationFactory,
+ "Lorg/apache/harmony/lang/annotation/AnnotationFactory;" },
+ { &gDvm.classOrgApacheHarmonyLangAnnotationAnnotationMember,
+ "Lorg/apache/harmony/lang/annotation/AnnotationMember;" },
+ { &gDvm.classOrgApacheHarmonyLangAnnotationAnnotationMemberArray,
+ "[Lorg/apache/harmony/lang/annotation/AnnotationMember;" },
+
+ { NULL, NULL }
+ };