GenUML - Generate PlantUML from Java class files
This tool aids in creating PlantUML class diagrams by generating UML diagrams from Java class files. Diagrams can be generated from single class files, or generated diagrams can be inserted into PlantUML code based on comments containing the correct "pattern".
$ genuml --help
Usage: genuml [OPTIONS] COMMAND [ARGS]...
Generate PlantUML class diagram DSL from Java class files.
Options:
--version
--help Show this message and exit.
Commands:
generate Generate PlantUML for single given Java class file.
insert Insert diagrams into PlantUML containing pattern comments.
Some functionality, as well as the generated diagram style, are based on ObjectAid UML Explorer, an Eclipse plug-in which seems to no longer be supported.
Example usage
genuml insert --class-dir "WEB-INF/classes" plantuml-diagram.puml \
| java -jar plantuml.jar -pipe > diagram.png
Some explanation:
- Compiled classes are found in
WEB-INF/classes. plantuml-diagram.pumlcontains PlantUML code as well as "pattern" comments referencing specific classes contained in the given folders (see example).- This file will be processed with the generated diagrams being placed directly after their pattern comments. Transformed output will be printed to stdout (and in this example, piped directly to PlantUML).
plantuml.jarhas been downloaded to the local folder.
Example PlantUML with pattern comments
@startuml
skinparam linetype polyline
' Pattern comments that will be processed by GenUML:
'!gen_java tests.data.ExampleClass
'!gen_java tests.data.ExampleAbstract
'!gen_java tests.data.ExampleInterface
'!gen_java tests.data.ExampleEnum: LOW HIGH
ExampleInterface *-- ExampleClass : implements
ExampleClass .> "0..1" ExampleEnum
ExampleClass -> ExampleAbstract
@enduml
which could then be used to generate this diagram:
Installation
Install from PyPI
With Python 3 installed on your system, you can run:
pip install genuml
To test that installation worked, run:
genuml --help
and you can uninstall at any time with:
pip uninstall genuml
Install from Github
To install the newest code directly from Github:
pip install git+https://github.com/samuller/genuml
And uninstall remains the same:
pip uninstall genuml
Metadata
Release files for genuml 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| genuml-0.6.1.tar.gz | 7.6 kB | Without provenance | Details for genuml-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| genuml-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for genuml-0.6.1-py3-none-any.whl |
Total release size: 15.1 kB
Release files / genuml-0.6.1.tar.gz
| Download URL | genuml-0.6.1.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
decbc7587ed383863605a59645e818a1130bc1defbf6305af8dc263d3d6c3e21
|
|
BLAKE2b-256 checksum How to use checksums |
61cd25e53d720f02f25beebfc5af2785b376268e46d5c6f69a4ff15d0b9d32a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
|
Release files / genuml-0.6.1-py3-none-any.whl
| Download URL | genuml-0.6.1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bcab27c2e6b2ea59d4acaab46d6e0df3d71308b6c4e25f97ff66aeeba6f4fa0
|
|
BLAKE2b-256 checksum How to use checksums |
98dd1ca9dcfddeacf29f2c08406ad4e1e5cf24597779df0d6f3110c212aadd03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
|
Security for genuml 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.