Skip to content

feat: note overridden methods and summarize members with their modifiers and type - #47

Merged
r4sky0 merged 1 commit into
mainfrom
feat/overrides-and-summaries
Oct 13, 2026
Merged

r4sky0 merged 1 commit into
mainfrom
feat/overrides-and-summaries

Conversation

@r4sky0

@r4sky0 r4sky0 commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Stacked on #46. Retarget it to main once #46 merges.

Compared with Javadoc, member pages left out two things readers rely on: which method a declaration overrides or implements, and the return type and modifiers in the member summary. The summary also showed erased parameter types, such as of(Object, Object) for of(L left, R right).

Changes

  • "Specified by" and "Overrides" notes. The doclet now writes specifiedBy and overrides parts right after the description, following the standard doclet's rules, which I checked against javadoc output:
    • One "Specified by" for each interface method the method implements, taken from the declaring type's interfaces and their superinterfaces. A listed method that another listed method overrides is dropped.
    • Then the nearest superclass method: "Overrides", or "Specified by" when that method is abstract. That is why record methods read "Specified by: equals in class Record".
    • Each part is a method link, then in class or in interface, then a type link. Links to ancestors outside the documented API fall back to text, as summary links already do, so the showcase gets no new warnings.
  • Member summaries.
    • Methods and fields get a first column like Javadoc's "Modifier and Type", such as static <L, R> Pair<L, R>, final L and static final String. It is built from the signature tokens without annotations or public, and without abstract in interfaces. Its types link like signature types.
    • Member links show the declared parameters: of(L left, R right), Widget(String label).
    • Type summaries, constructor summaries and enum constants keep two columns.
  • docs/schema.md describes the two new part kinds. They are additive in schema 1, so older renderers show them under their kind name. docs/usage.rst describes the notes and the summary column.
  • Tests:
    • A new oracle test compares the notes and both summary columns with the standard doclet on an abstract generic class and a subclass.
    • The integration test checks the "Specified by" link on the fixture page.
    • The navigation test checks the new summary columns.

Not included

  • Javadoc's type arguments on the ancestor (Map.Entry<T,T>) and the summary's filter tabs (static, instance, abstract).
  • "Methods inherited from", the inheritance tree, known subclasses, and the class-use, tree and deprecated-list pages.

Checks run locally

  • pre-commit hooks: pass.
  • pytest -q: 137 passed.
  • showcase/build.py: warning counts equal the baseline in every theme. Checked the Pair page by hand: hashCode reads "Specified by: hashCode in interface Map.Entry" and "Overrides: hashCode in class Object", as in Javadoc.
  • sphinx-build -W --keep-going -n docs: passes. The text builder renders the three-column tables.
  • Browser checks (tests/visual_check.py, after building the fixture in all five themes): pass.

@r4sky0
r4sky0 added this pull request to stack #48 October 13, 2026 14:37
Base automatically changed from fix/javadoc-parity to main October 13, 2026 14:39
@r4sky0
r4sky0 force-pushed the feat/overrides-and-summaries branch from 2532aa6 to dce26dc Compare October 13, 2026 14:39
@github-actions

Copy link
Copy Markdown
Contributor

@r4sky0
r4sky0 merged commit 9ae1723 into main Oct 13, 2026
17 checks passed
@r4sky0
r4sky0 deleted the feat/overrides-and-summaries branch October 13, 2026 14:54
r4sky0 pushed a commit that referenced this pull request Oct 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.4.0](v0.3.0...v0.4.0)
(2026-10-13)


### Features

* note overridden methods and summarize members with their modifiers and
type ([#47](#47))
([9ae1723](9ae1723))


### Bug Fixes

* render links, throws, type parameters, annotations and quotes as the
standard doclet does
([#46](#46))
([0c91ca9](0c91ca9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant