Skip to content

Commit 1b29d21

Browse files
committed
add comments
1 parent 7a471c1 commit 1b29d21

File tree

7 files changed

+19
-4
lines changed

7 files changed

+19
-4
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/concrete/phases/InvocationContext.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ class InvocationPhaseError(cause: Throwable) : PhaseError(
1313
cause
1414
)
1515

16+
/**
17+
* This phase is about invoking user's code using [delegateInstrumentation].
18+
*/
1619
class InvocationContext(
1720
private val delegateInstrumentation: Instrumentation<Result<*>>
1821
) : PhaseContext<InvocationPhaseError> {

utbot-framework/src/main/kotlin/org/utbot/framework/concrete/phases/ModelConstructionContext.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ class ModelConstructionPhaseError(cause: Throwable) : PhaseError(
2929
cause
3030
)
3131

32+
/**
33+
* This phase of model construction from concrete values.
34+
*/
3235
class ModelConstructionContext(
3336
private val traceHandler: TraceHandler
3437
) : PhaseContext<ModelConstructionPhaseError> {

utbot-framework/src/main/kotlin/org/utbot/framework/concrete/phases/PhaseContext.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package org.utbot.framework.concrete.phases
22

3-
abstract class PhaseError(message: String, cause: Throwable) : Exception(message, cause) {
4-
override val cause: Throwable = super.cause!!
5-
}
6-
3+
abstract class PhaseError(message: String, override val cause: Throwable) : Exception(message)
74
interface PhaseContext<E: PhaseError> {
85
fun wrapError(error: Throwable): E
96
}

utbot-framework/src/main/kotlin/org/utbot/framework/concrete/phases/PostprocessingContext.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ class PostprocessingPhaseError(cause: Throwable) : PhaseError(
99
cause
1010
)
1111

12+
/**
13+
* The responsibility of this phase is resetting environment to the initial state.
14+
*/
1215
class PostprocessingContext : PhaseContext<PostprocessingPhaseError> {
1316

1417
override fun wrapError(error: Throwable): PostprocessingPhaseError =

utbot-framework/src/main/kotlin/org/utbot/framework/concrete/phases/PreparationContext.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class PreparationPhaseError(cause: Throwable) : PhaseError(
1111
cause
1212
)
1313

14+
/**
15+
* The responsibility of this phase is environment preparation before execution.
16+
*/
1417
class PreparationContext(
1518
private val traceHandler: TraceHandler
1619
) : PhaseContext<PreparationPhaseError> {

utbot-framework/src/main/kotlin/org/utbot/framework/concrete/phases/StatisticsCollectionContext.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class StatisticsCollectionPhaseError(cause: Throwable) : PhaseError(
1111
cause
1212
)
1313

14+
/**
15+
* This phase is about collection statistics such as coverage.
16+
*/
1417
class StatisticsCollectionContext(
1518
private val traceHandler: TraceHandler
1619
) : PhaseContext<StatisticsCollectionPhaseError> {

utbot-framework/src/main/kotlin/org/utbot/framework/concrete/phases/ValueConstructionContext.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class ValueConstructionPhaseError(cause: Throwable) : PhaseError(
1818
cause
1919
)
2020

21+
/**
22+
* This phase of values instantiation from given models.
23+
*/
2124
class ValueConstructionContext(
2225
instrumentationContext: InstrumentationContext
2326
) : PhaseContext<ValueConstructionPhaseError>, Closeable {

0 commit comments

Comments
 (0)