jdk/src/share/classes/java/lang/reflect/Executable.java
changeset 20482 6dc1f81f522c
parent 20481 2735b307d256
child 20506 d826dd5f8e10
--- a/jdk/src/share/classes/java/lang/reflect/Executable.java	Mon Sep 30 11:18:18 2013 +0200
+++ b/jdk/src/share/classes/java/lang/reflect/Executable.java	Mon Sep 30 12:19:48 2013 +0200
@@ -51,7 +51,6 @@
      * Accessor method to allow code sharing
      */
     abstract byte[] getAnnotationBytes();
-    abstract byte[] getTypeAnnotationBytes();
 
     /**
      * Does the Executable have generic information.
@@ -352,6 +351,12 @@
     private transient volatile Parameter[] parameters;
 
     private native Parameter[] getParameters0();
+    private native byte[] getTypeAnnotationBytes0();
+
+    // Needed by reflectaccess
+    byte[] getTypeAnnotationBytes() {
+        return getTypeAnnotationBytes0();
+    }
 
     /**
      * Returns an array of {@code Class} objects that represent the
@@ -541,7 +546,7 @@
      * @since 1.8
      */
     AnnotatedType getAnnotatedReturnType0(Type returnType) {
-        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes(),
+        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                 sun.misc.SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
@@ -574,7 +579,7 @@
     public AnnotatedType getAnnotatedReceiverType() {
         if (Modifier.isStatic(this.getModifiers()))
             return null;
-        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes(),
+        return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                 sun.misc.SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
@@ -600,7 +605,7 @@
      * @since 1.8
      */
     public AnnotatedType[] getAnnotatedParameterTypes() {
-        return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes(),
+        return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
                 sun.misc.SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
@@ -626,7 +631,7 @@
      * @since 1.8
      */
     public AnnotatedType[] getAnnotatedExceptionTypes() {
-        return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes(),
+        return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
                 sun.misc.SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,