All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.roroche.eoplantumlbuilder.diagrams.ClassDiagram.kt Maven / Gradle / Ivy

package com.github.roroche.eoplantumlbuilder.diagrams

import ch.ifocusit.plantuml.classdiagram.ClassDiagramBuilder
import com.github.roroche.eoplantumlbuilder.classes.Classes

/**
 * Class representing a PlantUML class diagram.
 *
 * @param delegate The delegate [Diagram].
 */
class ClassDiagram(
        delegate: Diagram
) : Diagram.Wrap(delegate) {

    /**
     * Secondary constructor that builds a [Diagram.Simple].
     *
     * @param classes The [Classes] to be scanned.
     * @param builder The [ClassDiagramBuilder] to build the class diagram.
     */
    constructor(
            classes: Classes,
            builder: ClassDiagramBuilder
    ) : this(
            Diagram.Simple(
                    builder.addClasse(
                            classes.list()
                    ).build()
            )
    )

    /**
     * Secondary constructor with defaults args.
     *
     * @param classes The [Classes] to be scanned.
     */
    constructor(classes: Classes) : this(
            classes = classes,
            builder = ClassDiagramBuilder()
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy