Skip to content

Instantly share code, notes, and snippets.

@socar-dorma
socar-dorma / CodesExt.kt
Created June 8, 2021 05:29
reflection을 이용한 공통코드 조회
object Codes {
// ... other codes ...
enum class SettlementType(val label: String, val value: String) {
AUTO("자동", "STLTP_AUTO"),
MANUAL("수동", "STLTP_MANUAL");
companion object {
fun getByValue(value: String): SettlementType? = values().find { it.value == value }
}