/plantuml-builder

Plantuml diagram from java sources

Primary LanguageJavaApache License 2.0Apache-2.0

Build Status Make a pull request License Maven Central

Plantuml builder

Tools to generate plantuml diagram from java sources.

This generated diagrams are an important part of the Living Documentation tool

class diagram

This code :

String diagram = new ClassDiagramBuilder()
        .addClasses(Vehicule.class, Car.class, Driver.class, Price.class, Wheel.class, Devise.class)
        .build();

Will get :

@startuml

interface Vehicule

class Car {
  brand : String
  model : String
  driver : Driver
  price : Price
  wheels : Collection<Wheel>
}

class Driver {
  name : String
  cars : List<Car>
}

class Price {
  amount : BigDecimal
  devise : Devise
}

class Wheel

enum Devise {
  CHF
  EUR
  USD
}

Vehicule <|-- Car
Car "*" <-> Driver : driver
Car --> Price : price
Car --> "*" Wheel : wheels
Price --> Devise : devise

@enduml
Asciidoctor Diagram classes diagram

For more uses cases, more options see ClassDiagramBuilderTest or PlantUmlBuilderTest classes