se.ansman.kotshi.model.EnumJsonAdapter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compiler Show documentation
Show all versions of compiler Show documentation
An annotations processor that generates Moshi adapters from Kotlin data classes
The newest version!
package se.ansman.kotshi.model
data class EnumJsonAdapter(
override val targetPackageName: String,
override val targetSimpleNames: List,
val entries: List,
val fallback: Entry?,
) : GeneratableJsonAdapter() {
init {
require(fallback == null || fallback in entries)
}
data class Entry(
val name: String,
val serializedName:String
)
}