CompiledModelLoader

class CompiledModelLoader(parentClassLoader: ClassLoader = MetamodelEntity::class.java.classLoader)

Loads the executable Highway model from compiled Kotlin classes.

This is the shared compiled-model boundary used by Gradle model checks and report generators. It deliberately loads objects rather than serializing them: references retain object identity, cycles remain navigable, and derived relations can be calculated over the live object graph.

Constructors

Link copied to clipboard
constructor(parentClassLoader: ClassLoader = MetamodelEntity::class.java.classLoader)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Request(val classpath: List<File>, val modelOutputClasspath: List<File>, val projectRoot: File, val elementDirectory: File, val loadAllRootContainers: Boolean = false, val moduleDirectories: Map<String, File> = emptyMap(), val subjectModules: Set<String>? = null, val contextModules: Set<String> = emptySet(), val elementModules: Map<String, String> = emptyMap())
Link copied to clipboard
data class Result(val topLevelEntities: List<CompiledModelLoader.TopLevelEntity>, val rootContainers: List<CompiledModelLoader.RootContainer>, val elementClassNames: Set<String>, val declarationModules: Map<String, String> = emptyMap(), val loadedModules: Set<String> = emptySet(), val entityModules: Map<MetamodelEntity, String> = emptyMap(), classLoader: URLClassLoader? = null, val urlReferenceTemplates: List<CompiledModelLoader.TopLevelURLReferenceTemplate> = emptyList(), val issueReferenceTemplates: List<CompiledModelLoader.TopLevelIssueReferenceTemplate> = emptyList()) : AutoCloseable
Link copied to clipboard
data class RootContainer(val declaringClassName: String, val entity: MetamodelEntity, val belongsToElement: Boolean = true)
Link copied to clipboard
data class TopLevelEntity(val declaringClassName: String, val referenceName: String, val entity: MetamodelEntity, val belongsToElement: Boolean)
Link copied to clipboard
data class TopLevelIssueReferenceTemplate(val declaringClassName: String, val referenceName: String, val template: IssueReferenceTemplate)
Link copied to clipboard
data class TopLevelURLReferenceTemplate(val declaringClassName: String, val referenceName: String, val template: URLReferenceTemplate)

Functions

Link copied to clipboard
fun load(request: CompiledModelLoader.Request, onProblem: (String, Throwable?) -> Unit = { _, _ -> }): CompiledModelLoader.Result

Executes project-local Kotlin file facades, binds their top-level model values, instantiates unbound no-arg root containers, and performs the normal Highway ownership/name wire-up.

Generated with STIG