--- old/make/aix/makefiles/mapfile-vers-debug 2015-04-08 15:16:50.000000000 +0300 +++ new/make/aix/makefiles/mapfile-vers-debug 2015-04-08 15:16:50.000000000 +0300 @@ -19,7 +19,7 @@ # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. -# +# # # Define public interface. @@ -107,6 +107,7 @@ JVM_GetClassTypeAnnotations; JVM_GetDeclaredClasses; JVM_GetDeclaringClass; + JVM_GetSimpleBinaryName; JVM_GetEnclosingMethodInfo; JVM_GetFieldIxModifiers; JVM_GetFieldTypeAnnotations; --- old/make/aix/makefiles/mapfile-vers-product 2015-04-08 15:16:50.000000000 +0300 +++ new/make/aix/makefiles/mapfile-vers-product 2015-04-08 15:16:50.000000000 +0300 @@ -19,7 +19,7 @@ # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. -# +# # # Define public interface. @@ -107,6 +107,7 @@ JVM_GetClassTypeAnnotations; JVM_GetDeclaredClasses; JVM_GetDeclaringClass; + JVM_GetSimpleBinaryName; JVM_GetEnclosingMethodInfo; JVM_GetFieldIxModifiers; JVM_GetInheritedAccessControlContext; --- old/make/bsd/makefiles/mapfile-vers-darwin-debug 2015-04-08 15:16:50.000000000 +0300 +++ new/make/bsd/makefiles/mapfile-vers-darwin-debug 2015-04-08 15:16:50.000000000 +0300 @@ -105,6 +105,7 @@ _JVM_GetClassTypeAnnotations _JVM_GetDeclaredClasses _JVM_GetDeclaringClass + _JVM_GetSimpleBinaryName _JVM_GetEnclosingMethodInfo _JVM_GetFieldIxModifiers _JVM_GetFieldTypeAnnotations --- old/make/bsd/makefiles/mapfile-vers-darwin-product 2015-04-08 15:16:51.000000000 +0300 +++ new/make/bsd/makefiles/mapfile-vers-darwin-product 2015-04-08 15:16:51.000000000 +0300 @@ -105,6 +105,7 @@ _JVM_GetClassTypeAnnotations _JVM_GetDeclaredClasses _JVM_GetDeclaringClass + _JVM_GetSimpleBinaryName _JVM_GetEnclosingMethodInfo _JVM_GetFieldIxModifiers _JVM_GetFieldTypeAnnotations --- old/make/bsd/makefiles/mapfile-vers-debug 2015-04-08 15:16:51.000000000 +0300 +++ new/make/bsd/makefiles/mapfile-vers-debug 2015-04-08 15:16:51.000000000 +0300 @@ -19,7 +19,7 @@ # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. -# +# # # Define public interface. @@ -107,6 +107,7 @@ JVM_GetClassTypeAnnotations; JVM_GetDeclaredClasses; JVM_GetDeclaringClass; + JVM_GetSimpleBinaryName; JVM_GetEnclosingMethodInfo; JVM_GetFieldIxModifiers; JVM_GetFieldTypeAnnotations; --- old/make/bsd/makefiles/mapfile-vers-product 2015-04-08 15:16:51.000000000 +0300 +++ new/make/bsd/makefiles/mapfile-vers-product 2015-04-08 15:16:51.000000000 +0300 @@ -19,7 +19,7 @@ # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. -# +# # # Define public interface. @@ -107,6 +107,7 @@ JVM_GetClassTypeAnnotations; JVM_GetDeclaredClasses; JVM_GetDeclaringClass; + JVM_GetSimpleBinaryName; JVM_GetEnclosingMethodInfo; JVM_GetFieldIxModifiers; JVM_GetFieldTypeAnnotations; --- old/make/linux/makefiles/mapfile-vers-debug 2015-04-08 15:16:51.000000000 +0300 +++ new/make/linux/makefiles/mapfile-vers-debug 2015-04-08 15:16:51.000000000 +0300 @@ -19,7 +19,7 @@ # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. -# +# # # Define public interface. @@ -107,6 +107,7 @@ JVM_GetClassTypeAnnotations; JVM_GetDeclaredClasses; JVM_GetDeclaringClass; + JVM_GetSimpleBinaryName; JVM_GetEnclosingMethodInfo; JVM_GetFieldIxModifiers; JVM_GetFieldTypeAnnotations; --- old/make/linux/makefiles/mapfile-vers-product 2015-04-08 15:16:52.000000000 +0300 +++ new/make/linux/makefiles/mapfile-vers-product 2015-04-08 15:16:51.000000000 +0300 @@ -19,7 +19,7 @@ # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. -# +# # # Define public interface. @@ -107,6 +107,7 @@ JVM_GetClassTypeAnnotations; JVM_GetDeclaredClasses; JVM_GetDeclaringClass; + JVM_GetSimpleBinaryName; JVM_GetEnclosingMethodInfo; JVM_GetFieldIxModifiers; JVM_GetFieldTypeAnnotations; --- old/src/share/vm/prims/jvm.cpp 2015-04-08 15:16:52.000000000 +0300 +++ new/src/share/vm/prims/jvm.cpp 2015-04-08 15:16:52.000000000 +0300 @@ -1523,6 +1523,32 @@ return outer_klass(); } +JVM_ENTRY(jstring, JVM_GetSimpleBinaryName(JNIEnv *env, jclass cls)) +{ + oop mirror = JNIHandles::resolve_non_null(cls); + if (java_lang_Class::is_primitive(mirror) || + !java_lang_Class::as_Klass(mirror)->oop_is_instance()) { + return NULL; + } + instanceKlassHandle k(THREAD, InstanceKlass::cast(java_lang_Class::as_Klass(mirror))); + constantPoolHandle i_cp(thread, k->constants()); + for (InnerClassesIterator iter(k); !iter.done(); iter.next()) { + int ioff = iter.inner_class_info_index(); + int ooff = iter.outer_class_info_index(); + int noff = iter.inner_name_index(); + if (noff != 0 && ioff != 0 && i_cp->klass_name_at_matches(k, ioff)) { + Klass* inner_klass = i_cp->klass_at(ioff, CHECK_NULL); + if (k() == inner_klass) { + Symbol* name = i_cp->symbol_at(noff); + Handle str = java_lang_String::create_from_symbol(name, CHECK_NULL); + return (jstring) JNIHandles::make_local(env, str()); + } + } + } + return NULL; +} +JVM_END + JVM_ENTRY(jstring, JVM_GetClassSignature(JNIEnv *env, jclass cls)) assert (cls != NULL, "illegal class"); JVMWrapper("JVM_GetClassSignature"); --- old/src/share/vm/prims/jvm.h 2015-04-08 15:16:52.000000000 +0300 +++ new/src/share/vm/prims/jvm.h 2015-04-08 15:16:52.000000000 +0300 @@ -426,6 +426,9 @@ JNIEXPORT jclass JNICALL JVM_GetDeclaringClass(JNIEnv *env, jclass ofClass); +JNIEXPORT jstring JNICALL +JVM_GetSimpleBinaryName(JNIEnv *env, jclass ofClass); + /* Generics support (JDK 1.5) */ JNIEXPORT jstring JNICALL JVM_GetClassSignature(JNIEnv *env, jclass cls);