< prev index next >

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

Print this page

        

*** 502,514 **** --- 502,517 ---- static final ReflectionFactory reflectionFactory = AccessController.doPrivileged( new ReflectionFactory.GetReflectionFactoryAction()); /** + * {@inheritDoc} + * <p>Any annotation returned by this method is a declaration annotation. * @throws NullPointerException {@inheritDoc} * @since 1.5 */ + @Override public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { throw new AssertionError("All subclasses should override this method"); } /**
*** 520,545 **** --- 523,555 ---- public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { return AnnotatedElement.super.isAnnotationPresent(annotationClass); } /** + * {@inheritDoc} + * <p>Any annotations returned by this method are declaration annotations. * @throws NullPointerException {@inheritDoc} * @since 1.8 */ @Override public <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) { throw new AssertionError("All subclasses should override this method"); } /** + * {@inheritDoc} + * <p>Any annotations returned by this method are declaration annotations. * @since 1.5 */ + @Override public Annotation[] getAnnotations() { return getDeclaredAnnotations(); } /** + * {@inheritDoc} + * <p>Any annotation returned by this method is a declaration annotation. * @throws NullPointerException {@inheritDoc} * @since 1.8 */ @Override public <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) {
*** 548,557 **** --- 558,569 ---- // getAnnotation. return getAnnotation(annotationClass); } /** + * {@inheritDoc} + * <p>Any annotations returned by this method are declaration annotations. * @throws NullPointerException {@inheritDoc} * @since 1.8 */ @Override public <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) {
*** 560,571 **** --- 572,586 ---- // getAnnotationsByType. return getAnnotationsByType(annotationClass); } /** + * {@inheritDoc} + * <p>Any annotations returned by this method are declaration annotations. * @since 1.5 */ + @Override public Annotation[] getDeclaredAnnotations() { throw new AssertionError("All subclasses should override this method"); } // Shared access checking logic.
< prev index next >