Skip to content

About

Compiler-backed Java API documentation rendered as native Sphinx pages

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

sphinx-java-autodoc

CI PyPI Documentation

Publish your Java library's guides and API reference in one searchable Sphinx site. sphinx-java-autodoc reads your Java sources and Javadoc comments with the JDK compiler APIs and renders them as native Sphinx content:

  • Generated pages for classes, interfaces, enums, records, annotation types and nested types.
  • Signatures, overloads, Javadoc links and inherited method documentation.
  • Class excerpts in handwritten guides, and cross-project links through intersphinx.
  • Content-based caching: pages refresh when sources change.

Extraction never runs application classes or annotation processors, and never downloads Java dependencies. See the Apache Commons Lang example for the output.

Requirements

Python 3.12+, Sphinx 8.2.x or 9.1.x, and JDK 25 for extraction. Your library can keep targeting Java 17 or 21. See compatibility and limits.

Quick start

uv add sphinx-java-autodoc

In docs/conf.py:

extensions = ["sphinx_java_autodoc"]
java_sources = ["../src/main/java"]
java_release = "17"
java_generate = "api"
java_visibility = "public"

Add api/index to the toctree in docs/index.rst, then build:

uv run sphinx-build -W --keep-going -n docs docs/_build/html

Next: the first-build walkthrough, writing guides, dependencies and CI and the configuration reference.

Development

See CONTRIBUTING.md. MIT licensed.

About

Compiler-backed Java API documentation rendered as native Sphinx pages

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages