Skip to content

Commit 886d14f

Browse files
committed
Add documentation for CgRegularClass
1 parent f9d7a17 commit 886d14f

File tree

1 file changed

+13
-0
lines changed
  • utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/tree

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package org.utbot.framework.codegen.model.tree
33
import org.utbot.common.WorkaroundReason
44
import org.utbot.common.workaround
55
import org.utbot.framework.codegen.Import
6+
import org.utbot.framework.codegen.model.constructor.tree.CgUtilClassConstructor
67
import org.utbot.framework.codegen.model.constructor.tree.TestsGenerationReport
78
import org.utbot.framework.codegen.model.util.CgExceptionHandler
89
import org.utbot.framework.codegen.model.visitor.CgRendererContext
@@ -147,6 +148,18 @@ sealed class AbstractCgClass<T : AbstractCgClassBody> : CgElement {
147148
get() = id.simpleName
148149
}
149150

151+
/**
152+
* This class represents any class that we may want to generate other than the test class.
153+
* At the moment the only such case is the generation of util class UtUtils.
154+
*
155+
* The difference with [CgTestClass] is in the body.
156+
* The structure of a test class body is fixed (we know what it should contain),
157+
* whereas an arbitrary class could contain anything.
158+
* For example, the body of UtUtils class contains a comment with information
159+
* about the version of UTBot it was generated with, and all the util methods.
160+
*
161+
* @see CgUtilClassConstructor
162+
*/
150163
class CgRegularClass(
151164
override val id: ClassId,
152165
override val annotations: List<CgAnnotation>,

0 commit comments

Comments
 (0)