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

Joe Darcy darcy at openjdk.java.net
Tue Feb 15 23:53:10 UTC 2022


On Tue, 15 Feb 2022 22:32:29 GMT, David Holmes <dholmes at openjdk.org> wrote:

> 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)."

Hmmm. Okay; I'll concede to the consensus here and withdraw the PR, CSR, etc.

Parameter does mostly pass the "duck test" for me to be a Member, but I don't think it is essential for it to implement the interface (and also not essential to create one or more new interfaces separate from JLS terminology to characterize parameters and members/constructors as a more precise unified type than AnnotatedElement).

Thanks.

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

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


More information about the core-libs-dev mailing list