jdk/src/share/classes/java/lang/reflect/Parameter.java
changeset 15511 8f45487ac694
parent 15294 df55735ea03c
child 15534 19228f4aedb4
equal deleted inserted replaced
15510:898d924a7efd 15511:8f45487ac694
   231      * {@inheritDoc}
   231      * {@inheritDoc}
   232      * @throws NullPointerException {@inheritDoc}
   232      * @throws NullPointerException {@inheritDoc}
   233      */
   233      */
   234     public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
   234     public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
   235         Objects.requireNonNull(annotationClass);
   235         Objects.requireNonNull(annotationClass);
   236 
   236         return annotationClass.cast(declaredAnnotations().get(annotationClass));
   237         return AnnotationSupport.getOneAnnotation(declaredAnnotations(), annotationClass);
       
   238     }
   237     }
   239 
   238 
   240     /**
   239     /**
   241      * {@inheritDoc}
   240      * {@inheritDoc}
   242      * @throws NullPointerException {@inheritDoc}
   241      * @throws NullPointerException {@inheritDoc}