Ensure log directory exists first.
[SquirrelJME.git] / emulators / emulator-base / src / main / c / mle_reflection.c
blobf604d056f89325a4f7ca3877df4aacf82ae3925b
1 /* -*- Mode: C++; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // Multi-Phasic Applications: SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // ------------------------------------------------------------------------ */
10 #include "squirreljme.h"
12 #define REFLECTION_CLASSNAME "cc/squirreljme/emulator/EmulatedReflectionShelf"
14 #define INVOKEMAIN_DESC "(Lcc/squirreljme/jvm/mle/brackets/TypeBracket;[Ljava/lang/String;)V"
16 JNIEXPORT void JNICALL Impl_mle_ReflectionShelf_invokeMain(JNIEnv* env,
17 jclass classy, jobject type, jobject args)
19 forwardCallStaticVoid(env, REFLECTION_CLASSNAME,
20 "invokeMain", INVOKEMAIN_DESC,
21 type, args);
24 static const JNINativeMethod mleReflectionMethods[] =
26 {"invokeMain", INVOKEMAIN_DESC, (void*)Impl_mle_ReflectionShelf_invokeMain},
29 jint JNICALL mleReflectionInit(JNIEnv* env, jclass classy)
31 return (*env)->RegisterNatives(env,
32 (*env)->FindClass(env, "cc/squirreljme/jvm/mle/ReflectionShelf"),
33 mleReflectionMethods, sizeof(mleReflectionMethods) /
34 sizeof(JNINativeMethod));