hotspot/src/share/vm/prims/jvm.cpp
changeset 15097 9db149412e0e
parent 14488 ab48109f7d1b
child 15102 0a86564e5f61
equal deleted inserted replaced
15096:3db45569f8c0 15097:9db149412e0e
  1571   Method* m = jvm_get_method_common(method, CHECK_NULL);
  1571   Method* m = jvm_get_method_common(method, CHECK_NULL);
  1572   return (jbyteArray) JNIHandles::make_local(env,
  1572   return (jbyteArray) JNIHandles::make_local(env,
  1573     Annotations::make_java_array(m->parameter_annotations(), THREAD));
  1573     Annotations::make_java_array(m->parameter_annotations(), THREAD));
  1574 JVM_END
  1574 JVM_END
  1575 
  1575 
       
  1576 /* Type use annotations support (JDK 1.8) */
       
  1577 
       
  1578 JVM_ENTRY(jbyteArray, JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls))
       
  1579   assert (cls != NULL, "illegal class");
       
  1580   JVMWrapper("JVM_GetClassTypeAnnotations");
       
  1581   ResourceMark rm(THREAD);
       
  1582   // Return null for arrays and primitives
       
  1583   if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
       
  1584     Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
       
  1585     if (k->oop_is_instance()) {
       
  1586       typeArrayOop a = Annotations::make_java_array(InstanceKlass::cast(k)->type_annotations()->class_annotations(), CHECK_NULL);
       
  1587       return (jbyteArray) JNIHandles::make_local(env, a);
       
  1588     }
       
  1589   }
       
  1590   return NULL;
       
  1591 JVM_END
       
  1592 
  1576 
  1593 
  1577 // New (JDK 1.4) reflection implementation /////////////////////////////////////
  1594 // New (JDK 1.4) reflection implementation /////////////////////////////////////
  1578 
  1595 
  1579 JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredFields(JNIEnv *env, jclass ofClass, jboolean publicOnly))
  1596 JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredFields(JNIEnv *env, jclass ofClass, jboolean publicOnly))
  1580 {
  1597 {