|
Blocks :
|
|
|
CSR :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
The spec https://download.java.net/java/early_access/jdk13/docs/api/java.base/java/lang/reflect/AccessibleObject.html#getAnnotation(java.lang.Class)
still says:
"Description copied from interface: AnnotatedElement
Returns this element's annotation for the specified type if such an annotation is present, else null."
In fact the following:
new AccessibleObject() {}.getAnnotation(Deprecated.class);
leads to
java.lang.AssertionError: All subclasses should override this method
same thing with
new AccessibleObject() {}.getAnnotationsByType(Deprecated.class);
This (default) behavior deserves to be specified for example with @implSpec
* @implSpec
* This default implementation throws {@code AssertionError}.
|