JAVA_OBJECT java_io_File_listImpl___byte_1ARRAY(JAVA_OBJECT n1)
{
    //XMLVM_BEGIN_NATIVE[java_io_File_listImpl___byte_1ARRAY]
	     // TODO: There may be memory management issues in this implementation
	     org_xmlvm_runtime_XMLVMArray *array =
	         (org_xmlvm_runtime_XMLVMArray *) __NEW_org_xmlvm_runtime_XMLVMArray();
	     array->fields.org_xmlvm_runtime_XMLVMArray.type_   =  __CLASS_org_xmlvm_runtime_XMLVMArray;
	     array->fields.org_xmlvm_runtime_XMLVMArray.length_ =  256;
	     array->fields.org_xmlvm_runtime_XMLVMArray.array_  = XMLVM_MALLOC(sizeof(JAVA_OBJECT) * 256);

	     JAVA_OBJECT *subarray = (JAVA_OBJECT *) array->fields.org_xmlvm_runtime_XMLVMArray.array_;

	     int i = 0;
	     for (i = 0; i < 256; i++) {
	         org_xmlvm_runtime_XMLVMArray *array2 =
	            (org_xmlvm_runtime_XMLVMArray *) __NEW_org_xmlvm_runtime_XMLVMArray();
	         array2->fields.org_xmlvm_runtime_XMLVMArray.type_   = __CLASS_byte;
	         array2->fields.org_xmlvm_runtime_XMLVMArray.length_ = 256;
	         array2->fields.org_xmlvm_runtime_XMLVMArray.array_  = XMLVM_MALLOC(sizeof(char) * 256);
	         subarray[i] = (JAVA_OBJECT) array2;
	     }

	     // Get the
	     char* fileName = XMLVMUtil_convertFromByteArray(n1);

	     DIR *d;
	     struct dirent *e;
	     if (d = opendir(fileName)) {
	         i = 0;
	         int j = 0;
	         while (e = readdir(d)) {
	             if (i < 256) { // TODO: What if there are more than 256 files?
	                 org_xmlvm_runtime_XMLVMArray *array2 = (org_xmlvm_runtime_XMLVMArray *) (subarray[i]);
	                 char *bytearray = array2->fields.org_xmlvm_runtime_XMLVMArray.array_;
	                 for (j = 0; j < 256; j++) {
	                     bytearray[j] = e->d_name[j];
	                     if (e->d_name[j] == 0) {
	                         array2->fields.org_xmlvm_runtime_XMLVMArray.length_ = j;
	                         break;
	                     }
	                 }
	                 i++;

	             }

	             // Add e->d_name to array!
	         }
	         array->fields.org_xmlvm_runtime_XMLVMArray.length_ =  i;
	         closedir(d);
	     } else {
	         // TODO: Throw IOException?
	     }
	     return array;
    //XMLVM_END_NATIVE
}
Esempio n. 2
0
void xmlvm_init()
{
#ifdef XMLVM_ENABLE_STACK_TRACES
    threadToStackTraceMapPtr = malloc(sizeof(struct hash_struct**));
    struct hash_struct* map = NULL; // This must be set to NULL according to the UTHash documentation
    *threadToStackTraceMapPtr = map;

    JAVA_LONG nativeThreadId = (JAVA_LONG) pthread_self();
    createStackForNewThread(nativeThreadId);
#endif

#ifndef XMLVM_NO_GC
//#ifdef DEBUG
//    setenv("GC_PRINT_STATS", "1", 1);
//#endif
    GC_INIT();
    GC_enable_incremental();
#endif

    staticInitializerController = XMLVM_MALLOC(sizeof(XMLVM_STATIC_INITIALIZER_CONTROLLER));
    staticInitializerController->initMutex = XMLVM_MALLOC(sizeof(pthread_mutex_t));
    if (0 != pthread_mutex_init(staticInitializerController->initMutex, NULL)) {
        XMLVM_ERROR("Error initializing static initializer mutex", __FILE__, __FUNCTION__, __LINE__);
    }

    __INIT_org_xmlvm_runtime_XMLVMArray();
    java_lang_Class_initNativeLayer__();
    __INIT_java_lang_System();
    org_xmlvm_runtime_XMLVMUtil_init__();
    /*
     * The implementation of the constant pool makes use of cross-compiled Java data structures.
     * During initialization of the VM done up to this point there are some circular dependencies
     * between class initializers of various classes and the constant pool that lead to some
     * inconsistencies. The easiest way to fix this is to clear the constant pool cache.
     */
    xmlvm_clear_constant_pool_cache();
    
#ifndef XMLVM_NO_GC
    GC_finalize_on_demand = 1;
    GC_java_finalization = 1;
    java_lang_Thread* finalizerThread = (java_lang_Thread*) org_xmlvm_runtime_FinalizerNotifier_startFinalizerThread__();
    GC_finalizer_notifier = org_xmlvm_runtime_FinalizerNotifier_finalizerNotifier__;
#endif

	reference_array = XMLVMUtil_NEW_ArrayList();
}
JAVA_OBJECT __NEW_org_xmlvm_runtime_XMLVMOutputStream()
{    XMLVM_CLASS_INIT(org_xmlvm_runtime_XMLVMOutputStream)
org_xmlvm_runtime_XMLVMOutputStream* me = (org_xmlvm_runtime_XMLVMOutputStream*) XMLVM_MALLOC(sizeof(org_xmlvm_runtime_XMLVMOutputStream));
    me->tib = &__TIB_org_xmlvm_runtime_XMLVMOutputStream;
    __INIT_INSTANCE_MEMBERS_org_xmlvm_runtime_XMLVMOutputStream(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_org_xmlvm_runtime_XMLVMOutputStream]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_util_Collections_EmptyMap()
{    XMLVM_CLASS_INIT(java_util_Collections_EmptyMap)
java_util_Collections_EmptyMap* me = (java_util_Collections_EmptyMap*) XMLVM_MALLOC(sizeof(java_util_Collections_EmptyMap));
    me->tib = &__TIB_java_util_Collections_EmptyMap;
    __INIT_INSTANCE_MEMBERS_java_util_Collections_EmptyMap(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_util_Collections_EmptyMap]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_lang_StackTraceElement()
{    XMLVM_CLASS_INIT(java_lang_StackTraceElement)
java_lang_StackTraceElement* me = (java_lang_StackTraceElement*) XMLVM_MALLOC(sizeof(java_lang_StackTraceElement));
    me->tib = &__TIB_java_lang_StackTraceElement;
    __INIT_INSTANCE_MEMBERS_java_lang_StackTraceElement(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_lang_StackTraceElement]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_lang_reflect_Modifier()
{    XMLVM_CLASS_INIT(java_lang_reflect_Modifier)
java_lang_reflect_Modifier* me = (java_lang_reflect_Modifier*) XMLVM_MALLOC(sizeof(java_lang_reflect_Modifier));
    me->tib = &__TIB_java_lang_reflect_Modifier;
    __INIT_INSTANCE_MEMBERS_java_lang_reflect_Modifier(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_lang_reflect_Modifier]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_nio_BufferFactory()
{    XMLVM_CLASS_INIT(java_nio_BufferFactory)
java_nio_BufferFactory* me = (java_nio_BufferFactory*) XMLVM_MALLOC(sizeof(java_nio_BufferFactory));
    me->tib = &__TIB_java_nio_BufferFactory;
    __INIT_INSTANCE_MEMBERS_java_nio_BufferFactory(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_nio_BufferFactory]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_org_xmlvm_runtime_XMLVMArray()
{    XMLVM_CLASS_INIT(org_xmlvm_runtime_XMLVMArray)
org_xmlvm_runtime_XMLVMArray* me = (org_xmlvm_runtime_XMLVMArray*) XMLVM_MALLOC(sizeof(org_xmlvm_runtime_XMLVMArray));
    me->tib = &__TIB_org_xmlvm_runtime_XMLVMArray;
    __INIT_INSTANCE_MEMBERS_org_xmlvm_runtime_XMLVMArray(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_org_xmlvm_runtime_XMLVMArray]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_util_Hashtable_1()
{    XMLVM_CLASS_INIT(java_util_Hashtable_1)
java_util_Hashtable_1* me = (java_util_Hashtable_1*) XMLVM_MALLOC(sizeof(java_util_Hashtable_1));
    me->tib = &__TIB_java_util_Hashtable_1;
    __INIT_INSTANCE_MEMBERS_java_util_Hashtable_1(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_util_Hashtable_1]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_org_xmlvm_runtime_RedTypeMarker()
{    XMLVM_CLASS_INIT(org_xmlvm_runtime_RedTypeMarker)
org_xmlvm_runtime_RedTypeMarker* me = (org_xmlvm_runtime_RedTypeMarker*) XMLVM_MALLOC(sizeof(org_xmlvm_runtime_RedTypeMarker));
    me->tib = &__TIB_org_xmlvm_runtime_RedTypeMarker;
    __INIT_INSTANCE_MEMBERS_org_xmlvm_runtime_RedTypeMarker(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_org_xmlvm_runtime_RedTypeMarker]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_nio_charset_CharsetDecoder()
{   XMLVM_CLASS_INIT(java_nio_charset_CharsetDecoder)
    java_nio_charset_CharsetDecoder* me = (java_nio_charset_CharsetDecoder*) XMLVM_MALLOC(sizeof(java_nio_charset_CharsetDecoder));
    me->tib = &__TIB_java_nio_charset_CharsetDecoder;
    __INIT_INSTANCE_MEMBERS_java_nio_charset_CharsetDecoder(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_nio_charset_CharsetDecoder]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_nio_charset_CodingErrorAction()
{    XMLVM_CLASS_INIT(java_nio_charset_CodingErrorAction)
java_nio_charset_CodingErrorAction* me = (java_nio_charset_CodingErrorAction*) XMLVM_MALLOC(sizeof(java_nio_charset_CodingErrorAction));
    me->tib = &__TIB_java_nio_charset_CodingErrorAction;
    __INIT_INSTANCE_MEMBERS_java_nio_charset_CodingErrorAction(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_nio_charset_CodingErrorAction]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_io_FileDescriptor()
{    XMLVM_CLASS_INIT(java_io_FileDescriptor)
java_io_FileDescriptor* me = (java_io_FileDescriptor*) XMLVM_MALLOC(sizeof(java_io_FileDescriptor));
    me->tib = &__TIB_java_io_FileDescriptor;
    __INIT_INSTANCE_MEMBERS_java_io_FileDescriptor(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_io_FileDescriptor]
    //XMLVM_END_WRAPPER
    return me;
}
Esempio n. 14
0
JAVA_OBJECT __NEW_nbody_NBodySystem()
{    XMLVM_CLASS_INIT(nbody_NBodySystem)
nbody_NBodySystem* me = (nbody_NBodySystem*) XMLVM_MALLOC(sizeof(nbody_NBodySystem));
    me->tib = &__TIB_nbody_NBodySystem;
    __INIT_INSTANCE_MEMBERS_nbody_NBodySystem(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_nbody_NBodySystem]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_security_BasicPermission()
{    XMLVM_CLASS_INIT(java_security_BasicPermission)
java_security_BasicPermission* me = (java_security_BasicPermission*) XMLVM_MALLOC(sizeof(java_security_BasicPermission));
    me->tib = &__TIB_java_security_BasicPermission;
    __INIT_INSTANCE_MEMBERS_java_security_BasicPermission(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_security_BasicPermission]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_lang_Thread_State()
{    XMLVM_CLASS_INIT(java_lang_Thread_State)
java_lang_Thread_State* me = (java_lang_Thread_State*) XMLVM_MALLOC(sizeof(java_lang_Thread_State));
    me->tib = &__TIB_java_lang_Thread_State;
    __INIT_INSTANCE_MEMBERS_java_lang_Thread_State(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_lang_Thread_State]
    //XMLVM_END_WRAPPER
    return me;
}
Esempio n. 17
0
JAVA_OBJECT __NEW_sdljava_image_SDLImage()
{
    if (!__TIB_sdljava_image_SDLImage.classInitialized) __INIT_sdljava_image_SDLImage();
    sdljava_image_SDLImage* me = (sdljava_image_SDLImage*) XMLVM_MALLOC(sizeof(sdljava_image_SDLImage));
    me->tib = &__TIB_sdljava_image_SDLImage;
    __INIT_INSTANCE_MEMBERS_sdljava_image_SDLImage(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_sdljava_image_SDLImage]
    //XMLVM_END_WRAPPER
    return me;
}
Esempio n. 18
0
JAVA_OBJECT __NEW_sdljava_video_SDLColor()
{
    if (!__TIB_sdljava_video_SDLColor.classInitialized) __INIT_sdljava_video_SDLColor();
    sdljava_video_SDLColor* me = (sdljava_video_SDLColor*) XMLVM_MALLOC(sizeof(sdljava_video_SDLColor));
    me->tib = &__TIB_sdljava_video_SDLColor;
    __INIT_INSTANCE_MEMBERS_sdljava_video_SDLColor(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_sdljava_video_SDLColor]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_lang_ClassLoader()
{
    if (!__TIB_java_lang_ClassLoader.classInitialized) __INIT_java_lang_ClassLoader();
    java_lang_ClassLoader* me = (java_lang_ClassLoader*) XMLVM_MALLOC(sizeof(java_lang_ClassLoader));
    me->tib = &__TIB_java_lang_ClassLoader;
    __INIT_INSTANCE_MEMBERS_java_lang_ClassLoader(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_lang_ClassLoader]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_org_xmlvm_runtime_XMLVMClassLoader()
{
    if (!__TIB_org_xmlvm_runtime_XMLVMClassLoader.classInitialized) __INIT_org_xmlvm_runtime_XMLVMClassLoader();
    org_xmlvm_runtime_XMLVMClassLoader* me = (org_xmlvm_runtime_XMLVMClassLoader*) XMLVM_MALLOC(sizeof(org_xmlvm_runtime_XMLVMClassLoader));
    me->tib = &__TIB_org_xmlvm_runtime_XMLVMClassLoader;
    __INIT_INSTANCE_MEMBERS_org_xmlvm_runtime_XMLVMClassLoader(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_org_xmlvm_runtime_XMLVMClassLoader]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_sdljava_event_SDLMouseButtonEvent()
{
    if (!__TIB_sdljava_event_SDLMouseButtonEvent.classInitialized) __INIT_sdljava_event_SDLMouseButtonEvent();
    sdljava_event_SDLMouseButtonEvent* me = (sdljava_event_SDLMouseButtonEvent*) XMLVM_MALLOC(sizeof(sdljava_event_SDLMouseButtonEvent));
    me->tib = &__TIB_sdljava_event_SDLMouseButtonEvent;
    __INIT_INSTANCE_MEMBERS_sdljava_event_SDLMouseButtonEvent(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_sdljava_event_SDLMouseButtonEvent]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_lang_Thread_State()
{
    if (!__TIB_java_lang_Thread_State.classInitialized) __INIT_java_lang_Thread_State();
    java_lang_Thread_State* me = (java_lang_Thread_State*) XMLVM_MALLOC(sizeof(java_lang_Thread_State));
    me->tib = &__TIB_java_lang_Thread_State;
    __INIT_INSTANCE_MEMBERS_java_lang_Thread_State(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_lang_Thread_State]
    //XMLVM_END_WRAPPER
    return me;
}
Esempio n. 23
0
JAVA_OBJECT __NEW_sdljava_SDLException()
{
    if (!__TIB_sdljava_SDLException.classInitialized) __INIT_sdljava_SDLException();
    sdljava_SDLException* me = (sdljava_SDLException*) XMLVM_MALLOC(sizeof(sdljava_SDLException));
    me->tib = &__TIB_sdljava_SDLException;
    __INIT_INSTANCE_MEMBERS_sdljava_SDLException(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_sdljava_SDLException]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_lang_NoSuchFieldException()
{
    if (!__TIB_java_lang_NoSuchFieldException.classInitialized) __INIT_java_lang_NoSuchFieldException();
    java_lang_NoSuchFieldException* me = (java_lang_NoSuchFieldException*) XMLVM_MALLOC(sizeof(java_lang_NoSuchFieldException));
    me->tib = &__TIB_java_lang_NoSuchFieldException;
    __INIT_INSTANCE_MEMBERS_java_lang_NoSuchFieldException(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_lang_NoSuchFieldException]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_java_util_Dictionary()
{
    if (!__TIB_java_util_Dictionary.classInitialized) __INIT_java_util_Dictionary();
    java_util_Dictionary* me = (java_util_Dictionary*) XMLVM_MALLOC(sizeof(java_util_Dictionary));
    me->tib = &__TIB_java_util_Dictionary;
    __INIT_INSTANCE_MEMBERS_java_util_Dictionary(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_util_Dictionary]
    //XMLVM_END_WRAPPER
    return me;
}
JAVA_OBJECT __NEW_org_xmlvm_runtime_Mutex()
{
    if (!__TIB_org_xmlvm_runtime_Mutex.classInitialized) __INIT_org_xmlvm_runtime_Mutex();
    org_xmlvm_runtime_Mutex* me = (org_xmlvm_runtime_Mutex*) XMLVM_MALLOC(sizeof(org_xmlvm_runtime_Mutex));
    me->tib = &__TIB_org_xmlvm_runtime_Mutex;
    __INIT_INSTANCE_MEMBERS_org_xmlvm_runtime_Mutex(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_org_xmlvm_runtime_Mutex]
    //XMLVM_END_WRAPPER
    return me;
}
Esempio n. 27
0
JAVA_OBJECT XMLVM_CREATE_ARRAY_CLASS_OBJECT(JAVA_OBJECT baseType)
{
    __TIB_DEFINITION_org_xmlvm_runtime_XMLVMArray* tib = XMLVM_MALLOC(sizeof(__TIB_DEFINITION_org_xmlvm_runtime_XMLVMArray));
    XMLVM_MEMCPY(tib, &__TIB_org_xmlvm_runtime_XMLVMArray, sizeof(__TIB_DEFINITION_org_xmlvm_runtime_XMLVMArray));
    tib->flags = XMLVM_TYPE_ARRAY;
    tib->baseType = baseType;
    tib->arrayType = JAVA_NULL;
    JAVA_OBJECT clazz = __NEW_java_lang_Class();
    java_lang_Class___INIT____java_lang_Object(clazz, tib);
    tib->clazz = clazz;
    // Set the arrayType in in baseType to this newly created array type class
    java_lang_Class* baseTypeClass = (java_lang_Class*) baseType;
    __TIB_DEFINITION_TEMPLATE* baseTypeTIB = (__TIB_DEFINITION_TEMPLATE*) baseTypeClass->fields.java_lang_Class.tib_;
    baseTypeTIB->arrayType = clazz;
    return clazz;
}
Esempio n. 28
0
JAVA_OBJECT xmlvm_create_java_string_from_pool(int pool_id)
{
    if (stringConstants == JAVA_NULL) {
        // TODO: use XMLVM_ATOMIC_MALLOC?
        stringConstants = XMLVM_MALLOC(xmlvm_constant_pool_size * sizeof(JAVA_OBJECT));
        XMLVM_BZERO(stringConstants, xmlvm_constant_pool_size * sizeof(JAVA_OBJECT));
    }
    if (stringConstants[pool_id] != JAVA_NULL) {
        return stringConstants[pool_id];
    }
    java_lang_String* str = __NEW_java_lang_String();
    org_xmlvm_runtime_XMLVMArray* charArray = XMLVMArray_createSingleDimensionWithData(__CLASS_char,
                                                                                       xmlvm_constant_pool_length[pool_id],
                                                                                       (JAVA_OBJECT) xmlvm_constant_pool_data[pool_id]);
    java_lang_String___INIT____char_1ARRAY(str, charArray);
    JAVA_OBJECT poolStr = XMLVMUtil_getFromStringPool(str);
    stringConstants[pool_id] = poolStr;
    return poolStr;
}
void __INIT_IMPL_sdljava_event_SDLMouseButtonEvent()
{
    // Initialize base class if necessary
    if (!__TIB_sdljava_event_SDLEvent.classInitialized) __INIT_sdljava_event_SDLEvent();
    __TIB_sdljava_event_SDLMouseButtonEvent.newInstanceFunc = __NEW_INSTANCE_sdljava_event_SDLMouseButtonEvent;
    // Copy vtable from base class
    XMLVM_MEMCPY(__TIB_sdljava_event_SDLMouseButtonEvent.vtable, __TIB_sdljava_event_SDLEvent.vtable, sizeof(__TIB_sdljava_event_SDLEvent.vtable));
    // Initialize vtable for this class
    // Initialize interface information
    __TIB_sdljava_event_SDLMouseButtonEvent.numImplementedInterfaces = 0;
    __TIB_sdljava_event_SDLMouseButtonEvent.implementedInterfaces = (__TIB_DEFINITION_TEMPLATE* (*)[1]) XMLVM_MALLOC(sizeof(__TIB_DEFINITION_TEMPLATE*) * 0);

    // Initialize interfaces if necessary and assign tib to implementedInterfaces

    __TIB_sdljava_event_SDLMouseButtonEvent.declaredFields = &__field_reflection_data[0];
    __TIB_sdljava_event_SDLMouseButtonEvent.numDeclaredFields = sizeof(__field_reflection_data) / sizeof(XMLVM_FIELD_REFLECTION_DATA);
    __TIB_sdljava_event_SDLMouseButtonEvent.constructorDispatcherFunc = constructor_dispatcher;
    __TIB_sdljava_event_SDLMouseButtonEvent.declaredConstructors = &__constructor_reflection_data[0];
    __TIB_sdljava_event_SDLMouseButtonEvent.numDeclaredConstructors = sizeof(__constructor_reflection_data) / sizeof(XMLVM_CONSTRUCTOR_REFLECTION_DATA);
    __TIB_sdljava_event_SDLMouseButtonEvent.methodDispatcherFunc = method_dispatcher;
    __TIB_sdljava_event_SDLMouseButtonEvent.declaredMethods = &__method_reflection_data[0];
    __TIB_sdljava_event_SDLMouseButtonEvent.numDeclaredMethods = sizeof(__method_reflection_data) / sizeof(XMLVM_METHOD_REFLECTION_DATA);
    __CLASS_sdljava_event_SDLMouseButtonEvent = XMLVM_CREATE_CLASS_OBJECT(&__TIB_sdljava_event_SDLMouseButtonEvent);
    __TIB_sdljava_event_SDLMouseButtonEvent.clazz = __CLASS_sdljava_event_SDLMouseButtonEvent;
    __TIB_sdljava_event_SDLMouseButtonEvent.baseType = JAVA_NULL;
    __CLASS_sdljava_event_SDLMouseButtonEvent_1ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_sdljava_event_SDLMouseButtonEvent);
    __CLASS_sdljava_event_SDLMouseButtonEvent_2ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_sdljava_event_SDLMouseButtonEvent_1ARRAY);
    __CLASS_sdljava_event_SDLMouseButtonEvent_3ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_sdljava_event_SDLMouseButtonEvent_2ARRAY);
    //XMLVM_BEGIN_WRAPPER[__INIT_sdljava_event_SDLMouseButtonEvent]
    //XMLVM_END_WRAPPER

    __TIB_sdljava_event_SDLMouseButtonEvent.classInitialized = 1;
}
void __INIT_IMPL_java_lang_Thread_State()
{
    // Initialize base class if necessary
    if (!__TIB_java_lang_Enum.classInitialized) __INIT_java_lang_Enum();
    __TIB_java_lang_Thread_State.newInstanceFunc = __NEW_INSTANCE_java_lang_Thread_State;
    // Copy vtable from base class
    XMLVM_MEMCPY(__TIB_java_lang_Thread_State.vtable, __TIB_java_lang_Enum.vtable, sizeof(__TIB_java_lang_Enum.vtable));
    // Initialize vtable for this class
    // Initialize interface information
    __TIB_java_lang_Thread_State.numImplementedInterfaces = 2;
    __TIB_java_lang_Thread_State.implementedInterfaces = (__TIB_DEFINITION_TEMPLATE* (*)[1]) XMLVM_MALLOC(sizeof(__TIB_DEFINITION_TEMPLATE*) * 2);

    // Initialize interfaces if necessary and assign tib to implementedInterfaces

    if (!__TIB_java_io_Serializable.classInitialized) __INIT_java_io_Serializable();
    __TIB_java_lang_Thread_State.implementedInterfaces[0][0] = &__TIB_java_io_Serializable;

    if (!__TIB_java_lang_Comparable.classInitialized) __INIT_java_lang_Comparable();
    __TIB_java_lang_Thread_State.implementedInterfaces[0][1] = &__TIB_java_lang_Comparable;
    // Initialize itable for this class
    __TIB_java_lang_Thread_State.itableBegin = &__TIB_java_lang_Thread_State.itable[0];
    __TIB_java_lang_Thread_State.itable[XMLVM_ITABLE_IDX_java_lang_Comparable_compareTo___java_lang_Object] = __TIB_java_lang_Thread_State.vtable[6];

    _STATIC_java_lang_Thread_State_NEW = (java_lang_Thread_State*) JAVA_NULL;
    _STATIC_java_lang_Thread_State_RUNNABLE = (java_lang_Thread_State*) JAVA_NULL;
    _STATIC_java_lang_Thread_State_BLOCKED = (java_lang_Thread_State*) JAVA_NULL;
    _STATIC_java_lang_Thread_State_WAITING = (java_lang_Thread_State*) JAVA_NULL;
    _STATIC_java_lang_Thread_State_TIMED_WAITING = (java_lang_Thread_State*) JAVA_NULL;
    _STATIC_java_lang_Thread_State_TERMINATED = (java_lang_Thread_State*) JAVA_NULL;
    _STATIC_java_lang_Thread_State__VALUES = (org_xmlvm_runtime_XMLVMArray*) JAVA_NULL;

    __TIB_java_lang_Thread_State.declaredFields = &__field_reflection_data[0];
    __TIB_java_lang_Thread_State.numDeclaredFields = sizeof(__field_reflection_data) / sizeof(XMLVM_FIELD_REFLECTION_DATA);
    __TIB_java_lang_Thread_State.constructorDispatcherFunc = constructor_dispatcher;
    __TIB_java_lang_Thread_State.declaredConstructors = &__constructor_reflection_data[0];
    __TIB_java_lang_Thread_State.numDeclaredConstructors = sizeof(__constructor_reflection_data) / sizeof(XMLVM_CONSTRUCTOR_REFLECTION_DATA);
    __TIB_java_lang_Thread_State.methodDispatcherFunc = method_dispatcher;
    __TIB_java_lang_Thread_State.declaredMethods = &__method_reflection_data[0];
    __TIB_java_lang_Thread_State.numDeclaredMethods = sizeof(__method_reflection_data) / sizeof(XMLVM_METHOD_REFLECTION_DATA);
    __CLASS_java_lang_Thread_State = XMLVM_CREATE_CLASS_OBJECT(&__TIB_java_lang_Thread_State);
    __TIB_java_lang_Thread_State.clazz = __CLASS_java_lang_Thread_State;
    __TIB_java_lang_Thread_State.baseType = JAVA_NULL;
    __CLASS_java_lang_Thread_State_1ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_java_lang_Thread_State);
    __CLASS_java_lang_Thread_State_2ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_java_lang_Thread_State_1ARRAY);
    __CLASS_java_lang_Thread_State_3ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_java_lang_Thread_State_2ARRAY);
    java_lang_Thread_State___CLINIT_();
    //XMLVM_BEGIN_WRAPPER[__INIT_java_lang_Thread_State]
    //XMLVM_END_WRAPPER

    __TIB_java_lang_Thread_State.classInitialized = 1;
}