File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/codegen/services/language Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
package org.utbot.framework.codegen.services.language
2
2
3
+ import org.utbot.framework.codegen.domain.ProjectType
3
4
import org.utbot.framework.codegen.domain.context.TestClassContext
4
5
import org.utbot.framework.codegen.domain.context.CgContext
5
6
import org.utbot.framework.codegen.renderer.CgPrinter
@@ -45,8 +46,12 @@ abstract class CgLanguageAssistant {
45
46
open fun getCallableAccessManagerBy (context : CgContext ): CgCallableAccessManager =
46
47
CgCallableAccessManagerImpl (context)
47
48
open fun getStatementConstructorBy (context : CgContext ): CgStatementConstructor = CgStatementConstructorImpl (context)
48
- open fun getVariableConstructorBy (context : CgContext ): CgVariableConstructor =
49
- if (context.isSpringClass) CgSpringVariableConstructor (context) else CgVariableConstructor (context)
49
+
50
+ open fun getVariableConstructorBy (context : CgContext ): CgVariableConstructor = when (context.projectType) {
51
+ ProjectType .Spring -> CgSpringVariableConstructor (context)
52
+ else -> CgVariableConstructor (context)
53
+ }
54
+
50
55
open fun getMethodConstructorBy (context : CgContext ): CgMethodConstructor = CgMethodConstructor (context)
51
56
open fun getCgFieldStateManager (context : CgContext ): CgFieldStateManager = CgFieldStateManagerImpl (context)
52
57
You can’t perform that action at this time.
0 commit comments