aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/prims/nativeLookup.hpp
diff options
context:
space:
mode:
authorduke <none@none>2007-12-01 00:00:00 +0000
committerduke <none@none>2007-12-01 00:00:00 +0000
commitfa88c88cef63eb7f9083dccb60548d78635a44b1 (patch)
tree8376f6e5c41e70162b5867d9e1fea3f17f540473 /src/share/vm/prims/nativeLookup.hpp
downloadjdk8u_hotspot-fa88c88cef63eb7f9083dccb60548d78635a44b1.tar.gz
Initial load
Diffstat (limited to 'src/share/vm/prims/nativeLookup.hpp')
-rw-r--r--src/share/vm/prims/nativeLookup.hpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/share/vm/prims/nativeLookup.hpp b/src/share/vm/prims/nativeLookup.hpp
new file mode 100644
index 000000000..4b308761c
--- /dev/null
+++ b/src/share/vm/prims/nativeLookup.hpp
@@ -0,0 +1,45 @@
+/*
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+// NativeLookup provides an interface for finding DLL entry points for
+// Java native functions.
+
+class NativeLookup : AllStatic {
+ private:
+ // JNI name computation
+ static char* pure_jni_name(methodHandle method);
+ static char* long_jni_name(methodHandle method);
+
+ // Style specific lookup
+ static address lookup_style(methodHandle method, char* pure_name, const char* long_name, int args_size, bool os_style, bool& in_base_library, TRAPS);
+ static address lookup_base (methodHandle method, bool& in_base_library, TRAPS);
+ static address lookup_entry(methodHandle method, bool& in_base_library, TRAPS);
+ static address lookup_entry_prefixed(methodHandle method, bool& in_base_library, TRAPS);
+ public:
+ // Lookup native function. May throw UnsatisfiedLinkError.
+ static address lookup(methodHandle method, bool& in_base_library, TRAPS);
+
+ // Lookup native functions in base library.
+ static address base_library_lookup(const char* class_name, const char* method_name, const char* signature);
+};