Skip to content

Commit 1e0302b

Browse files
committed
Support isStatic and isNested flags in CgRegularClass and its builder
1 parent c1f50a5 commit 1e0302b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/tree/Builders.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ class CgRegularClassBuilder : CgBuilder<CgRegularClass> {
3737
var superclass: ClassId? = null
3838
val interfaces: MutableList<ClassId> = mutableListOf()
3939
lateinit var body: CgRegularClassBody
40+
var isStatic: Boolean = false
41+
var isNested: Boolean = false
4042

41-
override fun build() = CgRegularClass(id, annotations, superclass, interfaces, body)
43+
override fun build() = CgRegularClass(id, annotations, superclass, interfaces, body, isStatic, isNested)
4244
}
4345

4446
fun buildRegularClass(init: CgRegularClassBuilder.() -> Unit) = CgRegularClassBuilder().apply(init).build()

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/tree/CgElement.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ class CgRegularClass(
152152
override val annotations: List<CgAnnotation>,
153153
override val superclass: ClassId?,
154154
override val interfaces: List<ClassId>,
155-
override val body: CgRegularClassBody
155+
override val body: CgRegularClassBody,
156+
override val isStatic: Boolean,
157+
override val isNested: Boolean
156158
) : AbstractCgClass<CgRegularClassBody>()
157159

158160
data class CgTestClass(

0 commit comments

Comments
 (0)