com.github.chriskn.structurizrextension.model.Component.kt Maven / Gradle / Ivy
package com.github.chriskn.structurizrextension.model
import com.structurizr.io.plantuml.C4PlantUMLWriter
import com.structurizr.model.Component
var Component.c4Type: C4Type?
/**
* Returns the [C4Type] of the component.
*/
get() = if (this.properties.containsKey(C4PlantUMLWriter.C4_ELEMENT_TYPE)) {
C4Type.fromC4Type(this.properties.getValue(C4PlantUMLWriter.C4_ELEMENT_TYPE))
} else {
null
}
/**
* Sets the [C4Type] of the component.
*/
set(value) {
if (value != null) {
this.addProperty(C4PlantUMLWriter.C4_ELEMENT_TYPE, value.c4Type)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy