Skip to content

Commit

Permalink
add finalize flag
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Jul 19, 2024
1 parent 5a4eda8 commit ec06962
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ abstract class MappingResolver<T : MappingResolver<T>>(val name: String) {
private val LOGGER = KotlinLogging.logger {}
}

var finalized = false
private set

open var envType by FinalizeOnRead(EnvType.JOINED)

private val _entries = finalizableMapOf<String, MappingEntry>()
Expand Down Expand Up @@ -70,6 +73,7 @@ abstract class MappingResolver<T : MappingResolver<T>>(val name: String) {
}

open suspend fun finalize() {
finalized = true
_entries.finalize()
_entries.values.forEach { it.finalize() }
}
Expand Down

0 comments on commit ec06962

Please sign in to comment.