jdk/src/share/classes/java/lang/Package.java
changeset 14676 985410ec95e3
parent 14342 8435a30053c1
child 15534 19228f4aedb4
equal deleted inserted replaced
14675:17224d0282f1 14676:985410ec95e3
   393         Class<? extends Annotation> annotationClass) {
   393         Class<? extends Annotation> annotationClass) {
   394         return getPackageInfo().isAnnotationPresent(annotationClass);
   394         return getPackageInfo().isAnnotationPresent(annotationClass);
   395     }
   395     }
   396 
   396 
   397     /**
   397     /**
       
   398      * @throws NullPointerException {@inheritDoc}
       
   399      * @since 1.8
       
   400      */
       
   401     public  <A extends Annotation> A[] getAnnotations(Class<A> annotationClass) {
       
   402         return getPackageInfo().getAnnotations(annotationClass);
       
   403     }
       
   404 
       
   405     /**
   398      * @since 1.5
   406      * @since 1.5
   399      */
   407      */
   400     public Annotation[] getAnnotations() {
   408     public Annotation[] getAnnotations() {
   401         return getPackageInfo().getAnnotations();
   409         return getPackageInfo().getAnnotations();
       
   410     }
       
   411 
       
   412     /**
       
   413      * @throws NullPointerException {@inheritDoc}
       
   414      * @since 1.8
       
   415      */
       
   416     public <A extends Annotation> A getDeclaredAnnotation(Class<A> annotationClass) {
       
   417         return getPackageInfo().getDeclaredAnnotation(annotationClass);
       
   418     }
       
   419 
       
   420     /**
       
   421      * @throws NullPointerException {@inheritDoc}
       
   422      * @since 1.8
       
   423      */
       
   424     public <A extends Annotation> A[] getDeclaredAnnotations(Class<A> annotationClass) {
       
   425         return getPackageInfo().getDeclaredAnnotations(annotationClass);
   402     }
   426     }
   403 
   427 
   404     /**
   428     /**
   405      * @since 1.5
   429      * @since 1.5
   406      */
   430      */