phh@3427: /* mikael@4153: * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. phh@3427: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. phh@3427: * phh@3427: * This code is free software; you can redistribute it and/or modify it phh@3427: * under the terms of the GNU General Public License version 2 only, as phh@3427: * published by the Free Software Foundation. phh@3427: * phh@3427: * This code is distributed in the hope that it will be useful, but WITHOUT phh@3427: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or phh@3427: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License phh@3427: * version 2 for more details (a copy is included in the LICENSE file that phh@3427: * accompanied this code). phh@3427: * phh@3427: * You should have received a copy of the GNU General Public License version phh@3427: * 2 along with this work; if not, write to the Free Software Foundation, phh@3427: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. phh@3427: * phh@3427: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA phh@3427: * or visit www.oracle.com if you need additional information or have any phh@3427: * questions. phh@3427: * phh@3427: */ phh@3427: phh@3427: #ifndef SHARE_VM_PRIMS_JNI_EXPORT_HPP phh@3427: #define SHARE_VM_PRIMS_JNI_EXPORT_HPP phh@3427: phh@3427: #include "prims/jni.h" phh@3427: #include "prims/jvmtiExport.hpp" phh@3427: phh@3427: class JniExportedInterface { phh@3427: public: phh@3427: static bool GetExportedInterface(JavaVM* vm, void** penv, jint version, jint* iface) { phh@3427: if (JvmtiExport::is_jvmti_version(version)) { phh@3427: *iface = JvmtiExport::get_jvmti_interface(vm, penv, version); phh@3427: return true; phh@3427: } phh@3427: return false; phh@3427: } phh@3427: }; phh@3427: phh@3427: #endif // SHARE_VM_PRIMS_JNI_EXPORT_HPP