Package com.squareup.moshi.kotlin.codegen

Types

JsonClassCodegenProcessor
Link copied to clipboard

An annotation processor that reads Kotlin data classes and generates Moshi JsonAdapters for them. This generates Kotlin code, and understands basic Kotlin language features like default values and companion objects.

The generated class will match the visibility of the given data class (i.e. if it's internal, the adapter will also be internal).

@AutoService(value = [Processor::class])
@IncrementalAnnotationProcessor(value = IncrementalAnnotationProcessorType.ISOLATING)
class JsonClassCodegenProcessor : AbstractProcessor