All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.ansman.kotshi.model.GeneratedAnnotation.kt Maven / Gradle / Ivy

Go to download

An annotations processor that generates Moshi adapters from Kotlin data classes

There is a newer version: 3.0.0
Show newest version
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()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy