mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8266670: Better modeling of access flags in core reflection
Reviewed-by: mchung, rriggs, asotona
This commit is contained in:
parent
a5c25d8837
commit
de7467146f
14 changed files with 1480 additions and 16 deletions
|
@ -25,6 +25,8 @@
|
|||
|
||||
package java.lang.reflect;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Member is an interface that reflects identifying information about
|
||||
* a single member (a field or a method) or a constructor.
|
||||
|
@ -76,9 +78,25 @@ public interface Member {
|
|||
*
|
||||
* @return the Java language modifiers for the underlying member
|
||||
* @see Modifier
|
||||
* @see #accessFlags()
|
||||
*/
|
||||
public int getModifiers();
|
||||
|
||||
|
||||
/**
|
||||
* {@return an unmodifiable set of the {@linkplain AccessFlag
|
||||
* access flags} for this member, possibly empty}
|
||||
*
|
||||
* @implSpec
|
||||
* The default implementation throws {@link
|
||||
* UnsupportedOperationException}.
|
||||
* @see #getModifiers()
|
||||
* @since 20
|
||||
*/
|
||||
public default Set<AccessFlag> accessFlags() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@code true} if this member was introduced by
|
||||
* the compiler; returns {@code false} otherwise.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue