Module.c revision 16177:89ef4b822745
197403Sobrien/* 297403Sobrien * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 3169691Skan * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4169691Skan * 5117397Skan * This code is free software; you can redistribute it and/or modify it 697403Sobrien * under the terms of the GNU General Public License version 2 only, as 797403Sobrien * published by the Free Software Foundation. Oracle designates this 897403Sobrien * particular file as subject to the "Classpath" exception as provided 997403Sobrien * by Oracle in the LICENSE file that accompanied this code. 1097403Sobrien * 1197403Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT 1297403Sobrien * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1397403Sobrien * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1497403Sobrien * version 2 for more details (a copy is included in the LICENSE file that 1597403Sobrien * accompanied this code). 1697403Sobrien * 1797403Sobrien * You should have received a copy of the GNU General Public License version 1897403Sobrien * 2 along with this work; if not, write to the Free Software Foundation, 1997403Sobrien * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20169691Skan * 2197403Sobrien * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2297403Sobrien * or visit www.oracle.com if you need additional information or have any 2397403Sobrien * questions. 2497403Sobrien */ 2597403Sobrien 2697403Sobrien#include "jni.h" 2797403Sobrien#include "jvm.h" 2897403Sobrien 2997403Sobrien#include "java_lang_reflect_Module.h" 3097403Sobrien 3197403SobrienJNIEXPORT void JNICALL 32169691SkanJava_java_lang_reflect_Module_defineModule0(JNIEnv *env, jclass cls, jobject module, 33169691Skan jboolean is_open, jstring version, 34169691Skan jstring location, jobjectArray packages) 35169691Skan{ 36169691Skan JVM_DefineModule(env, module, is_open, version, location, packages); 37132720Skan} 38132720Skan 3997403SobrienJNIEXPORT void JNICALL 4097403SobrienJava_java_lang_reflect_Module_addReads0(JNIEnv *env, jclass cls, jobject from, jobject to) 4197403Sobrien{ 4297403Sobrien JVM_AddReadsModule(env, from, to); 43169691Skan} 44169691Skan 45169691SkanJNIEXPORT void JNICALL 4697403SobrienJava_java_lang_reflect_Module_addExports0(JNIEnv *env, jclass cls, jobject from, 47169691Skan jstring pkg, jobject to) 4897403Sobrien{ 49169691Skan JVM_AddModuleExports(env, from, pkg, to); 50169691Skan} 51169691Skan 52169691SkanJNIEXPORT void JNICALL 53169691SkanJava_java_lang_reflect_Module_addExportsToAll0(JNIEnv *env, jclass cls, jobject from, 54169691Skan jstring pkg) 55169691Skan{ 56169691Skan JVM_AddModuleExportsToAll(env, from, pkg); 57169691Skan} 58169691Skan 59169691SkanJNIEXPORT void JNICALL 60169691SkanJava_java_lang_reflect_Module_addExportsToAllUnnamed0(JNIEnv *env, jclass cls, 61169691Skan jobject from, jstring pkg) 62169691Skan{ 63169691Skan JVM_AddModuleExportsToAllUnnamed(env, from, pkg); 64169691Skan} 65169691Skan 66169691SkanJNIEXPORT void JNICALL 67169691SkanJava_java_lang_reflect_Module_addPackage0(JNIEnv *env, jclass cls, jobject m, jstring pkg) 68169691Skan{ 69169691Skan JVM_AddModulePackage(env, m, pkg); 70169691Skan} 71169691Skan