> This method tries to describe the source modifiers from an access flags > value. Since the introduction of this API, new source modifiers are > often represented by `class` file constructs other than access > flags, and access flags values in different `class` file > structures have different interpretations. As a result, the source > modifiers reported by this API may be incomplete or incorrect. > > The source modifiers of a declaration should be reconstructed manually, > by examining its reflective object. In addition, the reflective object > methods that provide user-friendly text representations, such as > `Class#toGenericString()`, render the source modifiers. > > The access flags of a declaration, with the correct interpretation, can > be obtained from the `accessFlags()` methods on the reflective > objects, such as `Class#accessFlags()`. > > To print an access flags value for debug output, consider using the > format ``%04x` instead of this method; this method omits all class > file access flags without a corresponding source modifier.
------------- Commit messages: - Merge branch 'master' of https://github.com/openjdk/jdk into fix/deprecate-modifier-tostring - Deprecate Modifier.toString Changes: https://git.openjdk.org/jdk/pull/30093/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30093&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8379337 Stats: 262 lines in 15 files changed: 172 ins; 41 del; 49 mod Patch: https://git.openjdk.org/jdk/pull/30093.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30093/head:pull/30093 PR: https://git.openjdk.org/jdk/pull/30093
