8014836: Have GenericDeclaration extend AnnotatedElement
authordarcy
Wed, 22 May 2013 20:03:45 -0700
changeset 17710 ce8517f5a2fe
parent 17709 fc6f678fdb83
child 17711 3cb70d5832aa
child 21391 afc1fd9ddec0
8014836: Have GenericDeclaration extend AnnotatedElement Reviewed-by: abuckley, jfranck
jdk/src/share/classes/java/lang/Class.java
jdk/src/share/classes/java/lang/reflect/GenericDeclaration.java
--- a/jdk/src/share/classes/java/lang/Class.java	Wed May 22 20:21:13 2013 -0400
+++ b/jdk/src/share/classes/java/lang/Class.java	Wed May 22 20:03:45 2013 -0700
@@ -28,6 +28,7 @@
 import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Array;
 import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.GenericDeclaration;
 import java.lang.reflect.Member;
 import java.lang.reflect.Field;
 import java.lang.reflect.Executable;
@@ -115,9 +116,9 @@
  * @since   JDK1.0
  */
 public final class Class<T> implements java.io.Serializable,
-                              java.lang.reflect.GenericDeclaration,
-                              java.lang.reflect.Type,
-                              java.lang.reflect.AnnotatedElement {
+                              GenericDeclaration,
+                              Type,
+                              AnnotatedElement {
     private static final int ANNOTATION= 0x00002000;
     private static final int ENUM      = 0x00004000;
     private static final int SYNTHETIC = 0x00001000;
@@ -3182,7 +3183,7 @@
      */
     @Override
     public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
-        return AnnotatedElement.super.isAnnotationPresent(annotationClass);
+        return GenericDeclaration.super.isAnnotationPresent(annotationClass);
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/reflect/GenericDeclaration.java	Wed May 22 20:21:13 2013 -0400
+++ b/jdk/src/share/classes/java/lang/reflect/GenericDeclaration.java	Wed May 22 20:03:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. 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
@@ -30,7 +30,7 @@
  *
  * @since 1.5
  */
-public interface GenericDeclaration {
+public interface GenericDeclaration extends AnnotatedElement {
     /**
      * Returns an array of {@code TypeVariable} objects that
      * represent the type variables declared by the generic