RFR: 8336275: Move common Method and Constructor fields to Executable

Chen Liang liach at openjdk.org
Tue Jul 16 22:43:51 UTC 2024


On Tue, 16 Jul 2024 22:00:49 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Move fields common to Method and Field to executable, which simplifies implementation. Removed useless transient modifiers as Method and Field were never serializable.
>
> src/java.base/share/classes/java/lang/reflect/Executable.java line 54:
> 
>> 52: public abstract sealed class Executable extends AccessibleObject
>> 53:     implements Member, GenericDeclaration permits Constructor, Method {
>> 54:     // fields injected by hotspot
> 
> If a field is listed here then it is NOT injected by hotspot.

What would be the terminology for a final field that's set by hotspot, against the regular java constrcutor rules?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20188#discussion_r1680139439


More information about the core-libs-dev mailing list