[lworld] RFR: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection [v9]

Roger Riggs rriggs at openjdk.org
Tue Aug 2 20:55:00 UTC 2022


On Tue, 2 Aug 2022 20:19:58 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Add support to java.lang.reflect.AccessFlag ACC_IDENTITY, ACC_VALUE, and ACC_PRIMITIVE.
>> Added corresponding flags to j.l.reflect.Modifier so the "source" of the AccessFlag is the Modifer mask.
>> Remove PERMITS_VALUE; moving the definition used by HotSpot to HotSpot code.
>> 
>> Add comments to java.l.reflect.Modifier suggesting use of AccessFlag instead and limitations.
>
> Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits:
> 
>  - Resync with mainline AccessFlag changes
>  - Merge branch '8287250-class-identity' into 8281463-value-modifiers
>  - Merge branch 'lworld' into 8287250-class-identity
>  - Merge branch 'lworld' into 8287250-class-identity
>  - Merge branch 'lworld' into 8287250-class-identity
>  - Update handling of obsolete ACC_SUPER and remove ACC_PERMITSVALUE
>  - Re-enable StaticFactoryTest
>  - Add Class.isIdentity
>    hack instanceKlass.cpp: ACC_SUPER to allow ACC_IDENTITY to getModifiers
>  - Cleanup of modifier use
>  - Merge branch 'lworld' into 8281463-value-modifiers
>  - ... and 10 more: https://git.openjdk.org/valhalla/compare/3dc006bd...ea58a934

The new identity, value, and primitive modifiers are included in java.lang.reflect.Modifier to 
provide straightforward mapping from the VM definitions of the modifier bits to those provided in the API.
Added clarifications to modifier methods to indicate that the source of the modifier bits is significant,
the `isXXX` methods of Modifier only give valid results when the modifier bits come from the respective class, method or field.

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

PR: https://git.openjdk.org/valhalla/pull/698


More information about the valhalla-dev mailing list