Move Jsr305State to util.runtime
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.config
|
||||
|
||||
import org.jetbrains.kotlin.utils.Jsr305State
|
||||
import kotlin.properties.ReadOnlyProperty
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
@@ -54,21 +55,3 @@ class AnalysisFlag<out T> internal constructor(
|
||||
val loadJsr305Annotations by Flag.Jsr305StateIgnoreByDefault
|
||||
}
|
||||
}
|
||||
|
||||
enum class Jsr305State(
|
||||
val description: String,
|
||||
val shouldReportWarning: Boolean = false,
|
||||
val shouldReportError: Boolean = false
|
||||
) {
|
||||
IGNORE("ignore"),
|
||||
WARN("warn", shouldReportWarning = true),
|
||||
ENABLE("enable", shouldReportError = true),
|
||||
;
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
val DEFAULT: Jsr305State = IGNORE
|
||||
|
||||
fun findByDescription(description: String?) = values().firstOrNull { it.description == description }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user