Skip to content
/ ImgDoc Public

Java library which generates graphic documentation of source code.

License

Notifications You must be signed in to change notification settings

SKocur/ImgDoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ImgDoc

Java library which generates graphic documentation/scheme of source code that is saved as a PNG image.

Features:

  • customizable
  • pretty annotations

Usage

Adding methods and classes to documentation:

@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;
    }
    //...
}

Initializing and customizing output of graphic documentation:

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);
    }
    
    //...
}

Available customizing methods:

DocBuilder().setPNGFileName(String fileName)
DocBuilder().setWidth(int width)
DocBuilder().setHeight(int height)

Explanations:

  • setPNGFileName() - sets name of output PNG image
  • setWidth() - sets width of output image
  • setHeight() - 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.

Example output

Image 1

About

Java library which generates graphic documentation of source code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages