Define StringDef in kotlin

Define StringDef in kotlin

@Retention(AnnotationRetention.SOURCE)
@StringDef(NORTH, SOUTH)
annotation class FilterType {

    companion object {
        const val NORTH = "NORTH"
        const val SOUTH = "SOUTH"
    }
}

你可能感兴趣的:(Define StringDef in kotlin)