RFR: JDK-8281766: Update java.lang.reflect.Parameter to implement Member

David Holmes dholmes at openjdk.java.net
Tue Feb 15 22:36:11 UTC 2022


On Tue, 15 Feb 2022 01:13:43 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> Retrofitting of Parameter to implement Member, an interface already implemented by similar reflective modeling classes.
> 
> Since Parameter is final, there is little compatibility impact from adding a new method.
> 
> Please also review the corresponding CSR:
> 
> https://bugs.openjdk.java.net/browse/JDK-8281767
> 
> I'll update the copyright year before pushing; I judged this as trivial enough to not require a regression test.

Technically a constructor is not a Member either, but the reflection API can get away with lumping constructors in with methods.

The JLS definition of Member comes from 8.1.6 and 8.2 - the key definition being in 8.1.6:

"A class body may contain declarations of members of the class, that is, fields (§8.3),
methods (§8.4), classes (§8.5), and interfaces (§8.5)."

-------------

PR: https://git.openjdk.java.net/jdk/pull/7468


More information about the core-libs-dev mailing list