sphinx-java-autodoc 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sphinx_java_autodoc/__init__.py +239 -0
- sphinx_java_autodoc/__main__.py +67 -0
- sphinx_java_autodoc/domain.py +387 -0
- sphinx_java_autodoc/extractor.py +254 -0
- sphinx_java_autodoc/java/SphinxDoclet.java +1036 -0
- sphinx_java_autodoc/javadoc.py +45 -0
- sphinx_java_autodoc/model.py +173 -0
- sphinx_java_autodoc/render.py +469 -0
- sphinx_java_autodoc/static/java-autodoc.css +28 -0
- sphinx_java_autodoc-0.2.0.dist-info/METADATA +109 -0
- sphinx_java_autodoc-0.2.0.dist-info/RECORD +14 -0
- sphinx_java_autodoc-0.2.0.dist-info/WHEEL +4 -0
- sphinx_java_autodoc-0.2.0.dist-info/entry_points.txt +2 -0
- sphinx_java_autodoc-0.2.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* Sphinx's nowrap tokens can exceed the viewport for qualified Java signatures. */
|
|
2
|
+
dl.java .pre {
|
|
3
|
+
white-space: normal;
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* Wide Javadoc tables scroll within the content column instead of the page. */
|
|
8
|
+
.java-table-wrapper {
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
overflow-x: auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Code in table cells stays whole; the table scrolls instead. */
|
|
14
|
+
table.java-table code .pre {
|
|
15
|
+
white-space: pre;
|
|
16
|
+
overflow-wrap: normal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Java summaries: names wrap between parameters, and anywhere on small screens. */
|
|
20
|
+
table.java.autosummary .pre {
|
|
21
|
+
white-space: normal;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (max-width: 600px) {
|
|
25
|
+
table.java.autosummary td {
|
|
26
|
+
overflow-wrap: anywhere;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: sphinx-java-autodoc
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Compiler-backed Java API documentation in native Sphinx nodes
|
|
5
|
+
Project-URL: Documentation, https://r4sky0.github.io/sphinx-java-autodoc/
|
|
6
|
+
Project-URL: Repository, https://github.com/r4sky0/sphinx-java-autodoc
|
|
7
|
+
Project-URL: Issues, https://github.com/r4sky0/sphinx-java-autodoc/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/r4sky0/sphinx-java-autodoc/releases
|
|
9
|
+
Author: Ralph Offinger
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: autodoc,documentation,java,javadoc,sphinx
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Framework :: Sphinx :: Extension
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Java
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Documentation :: Sphinx
|
|
23
|
+
Requires-Python: >=3.12
|
|
24
|
+
Requires-Dist: sphinx<9.2,>=9.1
|
|
25
|
+
Provides-Extra: test
|
|
26
|
+
Requires-Dist: build>=1; extra == 'test'
|
|
27
|
+
Requires-Dist: playwright>=1.50; extra == 'test'
|
|
28
|
+
Requires-Dist: pytest>=8; extra == 'test'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# sphinx-java-autodoc
|
|
32
|
+
|
|
33
|
+
[](https://github.com/r4sky0/sphinx-java-autodoc/actions/workflows/ci.yml)
|
|
34
|
+
[Documentation](https://r4sky0.github.io/sphinx-java-autodoc/)
|
|
35
|
+
|
|
36
|
+
Publish your Java library's guides and API reference in one searchable Sphinx
|
|
37
|
+
site. Keep API contracts in Java sources and Javadoc; write guides that help
|
|
38
|
+
your users choose an API and complete a task.
|
|
39
|
+
|
|
40
|
+
`sphinx-java-autodoc` reads Java sources and Javadoc comments with the JDK compiler
|
|
41
|
+
APIs and renders them as native Sphinx content:
|
|
42
|
+
|
|
43
|
+
- Generated, searchable pages for classes, interfaces, enums, records, annotation
|
|
44
|
+
types and nested types.
|
|
45
|
+
- Signatures, overloads, Javadoc links and inherited method documentation.
|
|
46
|
+
- Class excerpts in handwritten guides, and links between projects through intersphinx.
|
|
47
|
+
- Pages that refresh when sources change, with content-based extraction caching.
|
|
48
|
+
|
|
49
|
+
Extraction never executes application classes or annotation processors, and never
|
|
50
|
+
downloads Java dependencies. See the [Apache Commons Lang example](https://r4sky0.github.io/sphinx-java-autodoc/showcase/commons-lang/furo/)
|
|
51
|
+
for what the output looks like.
|
|
52
|
+
|
|
53
|
+
## Requirements
|
|
54
|
+
|
|
55
|
+
Python 3.12+, Sphinx 9.1.x, and **JDK 25 for extraction**. Your library can keep
|
|
56
|
+
targeting Java 17 or 21. See [compatibility and limits](https://r4sky0.github.io/sphinx-java-autodoc/compatibility.html)
|
|
57
|
+
for the tested versions.
|
|
58
|
+
|
|
59
|
+
## Quick start
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
uv add "sphinx-java-autodoc @ git+https://github.com/r4sky0/sphinx-java-autodoc.git"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
In `docs/conf.py`:
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
extensions = ["sphinx_java_autodoc"]
|
|
69
|
+
java_sources = ["../src/main/java"]
|
|
70
|
+
java_release = "17"
|
|
71
|
+
java_generate = "api"
|
|
72
|
+
java_visibility = "public"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Add `api/index` to the toctree in `docs/index.rst`, then build:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
uv run sphinx-build -W --keep-going -n docs docs/_build/html
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
[Publish your first API pages](https://r4sky0.github.io/sphinx-java-autodoc/getting-started.html) walks through these steps.
|
|
82
|
+
Then continue with:
|
|
83
|
+
|
|
84
|
+
- [Write a guide your users can follow](https://r4sky0.github.io/sphinx-java-autodoc/guide.html)
|
|
85
|
+
- [Build with dependencies and CI](https://r4sky0.github.io/sphinx-java-autodoc/build-integration.html): Maven/Gradle
|
|
86
|
+
classpaths, pre-extracted models and publishing to GitHub Pages
|
|
87
|
+
- [Configuration and reference](https://r4sky0.github.io/sphinx-java-autodoc/usage.html) and [supported Javadoc](https://r4sky0.github.io/sphinx-java-autodoc/javadoc-support.html)
|
|
88
|
+
- [Troubleshooting](https://r4sky0.github.io/sphinx-java-autodoc/troubleshooting.html)
|
|
89
|
+
- [How it works](https://r4sky0.github.io/sphinx-java-autodoc/design.html) and the [architecture decision](docs/adr/0001-jdk-doclet-xml-sphinx-domain.md)
|
|
90
|
+
|
|
91
|
+
## Development
|
|
92
|
+
|
|
93
|
+
From a clone of this repository:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
uv sync --locked
|
|
97
|
+
uv run --locked pre-commit install
|
|
98
|
+
uv run --locked pre-commit run --all-files
|
|
99
|
+
uv run --locked pytest
|
|
100
|
+
uv run --locked --group showcase python showcase/build.py
|
|
101
|
+
uv run --locked sphinx-build -W --keep-going -n docs docs/_build/html
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Development and releases are documented in [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
105
|
+
CI covers lint, compiler warnings, integration tests, built distributions,
|
|
106
|
+
dependency vulnerabilities, six HTML themes, the text builder, and Chromium
|
|
107
|
+
browser interactions.
|
|
108
|
+
|
|
109
|
+
[MIT licensed](LICENSE).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
sphinx_java_autodoc/__init__.py,sha256=pWLjl0U0-OUDs_qgEEX_pv1Aq76aIcArov8hcuQcvsI,9208
|
|
2
|
+
sphinx_java_autodoc/__main__.py,sha256=ZoDNKnyOSMsiGv7k6hfZgCEazLyvfiOpd096IFuBAEY,2240
|
|
3
|
+
sphinx_java_autodoc/domain.py,sha256=TkpzmvfsgEXoQSaUVaSQ8fx59oSi5Thn-X1Egwdwt5A,14205
|
|
4
|
+
sphinx_java_autodoc/extractor.py,sha256=sBBzCSukDeFGqeEUGMGblNnVp8kTMgKnaYCR2Gv_-5o,8847
|
|
5
|
+
sphinx_java_autodoc/javadoc.py,sha256=p6EDQ-2_tt8YwI4UpM1hyKTF-9WDI79Gl-ukT4DCB4s,1808
|
|
6
|
+
sphinx_java_autodoc/model.py,sha256=DvJEi4Q6C1wcpOo-3ym0l8PaKxPncEL3FXJuWzQZslY,7435
|
|
7
|
+
sphinx_java_autodoc/render.py,sha256=Qduoo4nLpdAKKxFvDiifIKekbn70Jhh4_c-cPsL31wo,19112
|
|
8
|
+
sphinx_java_autodoc/java/SphinxDoclet.java,sha256=zMDMq8Spiia6pcGjGa4TGaGr8FCcd7Pl3bKfu7OF8x8,37990
|
|
9
|
+
sphinx_java_autodoc/static/java-autodoc.css,sha256=ahbn-sRIqh4RQBEJJ0tMmoHtF0RmRO_b8nfJNc1vJl4,694
|
|
10
|
+
sphinx_java_autodoc-0.2.0.dist-info/METADATA,sha256=rFQk3YErqiazmwI-tggotDQWS2RR6S9R3Ch14-GPjC8,4576
|
|
11
|
+
sphinx_java_autodoc-0.2.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
12
|
+
sphinx_java_autodoc-0.2.0.dist-info/entry_points.txt,sha256=WgWf-WcpfeRFC2tcLu7lY0_OF8s_YnB1x-_T4TijaWs,74
|
|
13
|
+
sphinx_java_autodoc-0.2.0.dist-info/licenses/LICENSE,sha256=FE03yeUGD0GeRnHdafTfDp6JJzwDFOYi3xZJHcOQ8zo,1089
|
|
14
|
+
sphinx_java_autodoc-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 sphinx-java-autodoc contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|