< prev index next >

src/java.base/share/classes/java/lang/reflect/Executable.java

Print this page

        

*** 542,551 **** --- 542,554 ---- * declared in source ("mandated"), as well as parameters that * are neither implicitly nor explicitly declared in source * ("synthetic") to the parameter list for a method. See {@link * java.lang.reflect.Parameter} for more information. * + * <p>Note that any annotations returned by this method are + * declaration annotations. + * * @see java.lang.reflect.Parameter * @see java.lang.reflect.Parameter#getAnnotations * @return an array of arrays that represent the annotations on * the formal and implicit parameters, in declaration order, of * the executable represented by this object
*** 575,591 **** --- 578,596 ---- /** * {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ + @Override public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { Objects.requireNonNull(annotationClass); return annotationClass.cast(declaredAnnotations().get(annotationClass)); } /** * {@inheritDoc} + * * @throws NullPointerException {@inheritDoc} */ @Override public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { Objects.requireNonNull(annotationClass);
*** 594,603 **** --- 599,609 ---- } /** * {@inheritDoc} */ + @Override public Annotation[] getDeclaredAnnotations() { return AnnotationParser.toArray(declaredAnnotations()); } private transient volatile Map<Class<? extends Annotation>, Annotation> declaredAnnotations;
< prev index next >