/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is part of SableVM. * * See the file "LICENSE" for Copyright information and the * * terms and conditions for copying, distribution and * * modification of SableVM. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* ---------------------------------------------------------------------- Java_java_lang_VMSecurityManager_currentClassLoader ---------------------------------------------------------------------- */ /* * Class: java_lang_VMSecurityManager * Method: currentClassLoader * Signature: ()Ljava/lang/ClassLoader; */ JNIEXPORT jobject JNICALL Java_java_lang_VMSecurityManager_currentClassLoader (JNIEnv *_env, jclass class) { _svmt_JNIEnv *env = _svmf_cast_svmt_JNIEnv (_env); jobject class_loader = NULL; _svmf_resuming_java (env); { _svmt_class_loader_info *class_loader_info = _svmf_get_current_class_loader (env); if (class_loader_info->class_loader != NULL) { class_loader = _svmf_get_jni_frame_native_local (env); *class_loader = *(class_loader_info->class_loader); } } _svmf_stopping_java (env); return class_loader; }