jdk/src/share/classes/java/lang/Package.java
changeset 14676 985410ec95e3
parent 14342 8435a30053c1
child 15534 19228f4aedb4
--- a/jdk/src/share/classes/java/lang/Package.java	Wed Nov 28 05:18:57 2012 -0800
+++ b/jdk/src/share/classes/java/lang/Package.java	Wed Nov 28 09:21:37 2012 -0800
@@ -395,6 +395,14 @@
     }
 
     /**
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.8
+     */
+    public  <A extends Annotation> A[] getAnnotations(Class<A> annotationClass) {
+        return getPackageInfo().getAnnotations(annotationClass);
+    }
+
+    /**
      * @since 1.5
      */
     public Annotation[] getAnnotations() {
@@ -402,6 +410,22 @@
     }
 
     /**
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.8
+     */
+    public <A extends Annotation> A getDeclaredAnnotation(Class<A> annotationClass) {
+        return getPackageInfo().getDeclaredAnnotation(annotationClass);
+    }
+
+    /**
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.8
+     */
+    public <A extends Annotation> A[] getDeclaredAnnotations(Class<A> annotationClass) {
+        return getPackageInfo().getDeclaredAnnotations(annotationClass);
+    }
+
+    /**
      * @since 1.5
      */
     public Annotation[] getDeclaredAnnotations()  {