mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8225540: In core reflection note whether returned annotations are declaration or type annotations
Reviewed-by: alanb, prappo
This commit is contained in:
parent
b7d5172b89
commit
455d2e7cea
13 changed files with 209 additions and 24 deletions
|
@ -1381,6 +1381,9 @@ public final class Module implements AnnotatedElement {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
* This method returns {@code null} when invoked on an unnamed module.
|
||||
*
|
||||
* <p> Note that any annotation returned by this method is a
|
||||
* declaration annotation.
|
||||
*/
|
||||
@Override
|
||||
public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
|
||||
|
@ -1390,6 +1393,9 @@ public final class Module implements AnnotatedElement {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
* This method returns an empty array when invoked on an unnamed module.
|
||||
*
|
||||
* <p> Note that any annotations returned by this method are
|
||||
* declaration annotations.
|
||||
*/
|
||||
@Override
|
||||
public Annotation[] getAnnotations() {
|
||||
|
@ -1399,6 +1405,9 @@ public final class Module implements AnnotatedElement {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
* This method returns an empty array when invoked on an unnamed module.
|
||||
*
|
||||
* <p> Note that any annotations returned by this method are
|
||||
* declaration annotations.
|
||||
*/
|
||||
@Override
|
||||
public Annotation[] getDeclaredAnnotations() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue