Java library which generates graphic documentation/scheme of source code that is saved as a PNG image.
- customizable
- pretty annotations
@Draw(
author = "Developer 1",
version = "1.1 Stable",
description = "This is example class"
)
public class ExampleClass {
@Draw(
author = "Developer 2/Developer 3"
version = "0.4",
description = "Some description..."
)
private String returnString(String text) {
return text;
}
//...
}
public class ExampleClass {
public static void main(String[] args) {
ImgDoc imgDoc = new ImgDoc.DocBuilder()
.setPNGFileName("doc_exampleClass.png")
.setWidth(1400)
.setHeight(800)
.init();
imgDoc.draw(ExampleClass.class);
}
//...
}
DocBuilder().setPNGFileName(String fileName)
DocBuilder().setWidth(int width)
DocBuilder().setHeight(int height)
setPNGFileName()
- sets name of output PNG imagesetWidth()
- sets width of output imagesetHeight()
- sets height of output image
After customization invoke init()
on it to save all settings. To generate image, call:
ImgDoc().draw(Class<?> obj)
on instance of ImgDoc class. Generated documentation will be saved in main directory of project with name specified in setPNGFileName()
method.