[lworld] RFR: Add Class.isIdentity

Roger Riggs rriggs at openjdk.java.net
Tue May 31 18:29:34 UTC 2022


Add j.l.Class.isIdentity() as a complement to Class.isValue() and Class.isPrimitiveClass.

Class.getModifiers() is updated to remove VM was suppressing the ACC_IDENTITY bit (previously known as ACC_SUPER).

Updated Class.toString() to reflect the addition of ACC_IDENTITY.
For regular identity classes and interfaces, there is no change to toString.

Removed the obsolete test for ACC_SUPER

This PR may need to wait for corresponding VM changes.

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

Commit messages:
 - Re-enable StaticFactoryTest
 - Add Class.isIdentity

Changes: https://git.openjdk.java.net/valhalla/pull/700/files
 Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=700&range=00
  Stats: 100 lines in 5 files changed: 36 ins; 44 del; 20 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/700.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/700/head:pull/700

PR: https://git.openjdk.java.net/valhalla/pull/700



More information about the valhalla-dev mailing list