On Fri, 4 Apr 2025 13:36:19 GMT, Hannes Wallnöfer <[email protected]> wrote:
> Please review an enhancement to treat classes and interfaces that are not
> included and not unconditionally exported as hidden. This means they do not
> show up in the generated documentation even if they are implemented or
> extended by a documented type.
>
> This change makes the `@hidden` JavaDoc tag unnecessary in two internal base
> classes that previously used it, `jdk.internal.vm.vector.VectorSupport` and
> `jdk.internal.event.Event`. The generated documentation is unchanged.
>
> The change also adds support for the `@hidden` JavaDoc tag in interfaces,
> which was previously missing, and adds coverage to `TestHiddenTag.java`.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Signatures.java
line 165:
> 163: for (TypeMirror type : interfaces) {
> 164: TypeElement tDoc = utils.asTypeElement(type);
> 165: if (!(utils.isPublic(tDoc) ||
> utils.isLinkable(tDoc)) || utils.isHidden(tDoc)) {
This `(!isPublicOrProtected && !isLinkable) || isHidden` trio appears a few
times. The conditions are negated and wrapped in parentheses so it is easily
confusing on the web; can we extract this check into a new utils method?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24446#discussion_r2029581822