CodeConstruct

sealed interface CodeConstruct : CodeLocation

Marker for entities in the code metamodel: things that exist by virtue of being present in the analysed source code, as opposed to the spec-level entities of the com.stigway.metamodels.highway metamodel which describe the architecture irrespective of any particular implementation.

Every concrete CodeConstruct also extends com.stigway.metamodels.highway.MetamodelEntity so it participates in the shared registry, gets an auto-computed id from its Kotlin val name, and can carry the common name / description / asil metadata declared here.

Subtypes (top-down on the unified hierarchy scale): CodeFile, CodeNamespace, CodeClass, CodeFunction, CodeDataFlowSegment, CodeSourceLine, CodeInstruction. The analysed element itself is a highway Element (rendered as an ElementView), not a code construct. Each implements CodeLocation because every code construct has — by definition — a location in source.

sealed so the renderer/enrichment whens over the concrete set are exhaustive and the compiler flags any new construct that forgets a branch; every implementor lives in this package.

Inheritors

Properties

Link copied to clipboard
abstract val asil: ASIL?
Link copied to clipboard
abstract val column: Int?
Link copied to clipboard
abstract val demangledName: String?
Link copied to clipboard
abstract val description: String?
Link copied to clipboard
abstract val id: String

Fully-qualified identifier — inherited from com.stigway.metamodels.highway.MetamodelEntity in practice. Code constructs must be bound to a Kotlin model reference or deterministic analyzer-derived reference before this is read.

Link copied to clipboard
abstract val kind: CodeConstructKind

The category of this construct. Concrete subtypes pin this.

Link copied to clipboard
abstract val line: Int?
Link copied to clipboard
abstract val mangledName: String?
Link copied to clipboard
abstract val name: String?
Link copied to clipboard
abstract val source: StigRepoFile?
Generated with STIG