se.ansman.kotshi.model.GeneratedAnnotation.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
package se.ansman.kotshi.model
import com.squareup.kotlinpoet.AnnotationSpec
import com.squareup.kotlinpoet.ClassName
data class GeneratedAnnotation(
val annotationClass: ClassName,
val processorClass: ClassName,
) {
fun toAnnotationSpec(): AnnotationSpec =
AnnotationSpec.builder(annotationClass)
.addMember("%S", processorClass.canonicalName)
.addMember("comments = %S", "https://github.com/ansman/kotshi")
.build()
}