JsonClassCodegenProcessor

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

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).

Constructors

JsonClassCodegenProcessor
Link copied to clipboard
fun JsonClassCodegenProcessor()

Types

Companion
Link copied to clipboard
object Companion

Functions

getCompletions
Link copied to clipboard
open override fun getCompletions(p0: Element, p1: AnnotationMirror, p2: ExecutableElement, p3: String): MutableIterable<Completion>
getSupportedAnnotationTypes
Link copied to clipboard
open override fun getSupportedAnnotationTypes(): Set<String>
getSupportedOptions
Link copied to clipboard
open override fun getSupportedOptions(): Set<String>
getSupportedSourceVersion
Link copied to clipboard
open override fun getSupportedSourceVersion(): SourceVersion
init
Link copied to clipboard
open override fun init(processingEnv: ProcessingEnvironment)
isInitialized
Link copied to clipboard
open fun isInitialized(): Boolean
process
Link copied to clipboard
open override fun process(annotations: Set<TypeElement>, roundEnv: RoundEnvironment): Boolean

Properties

processingEnv
Link copied to clipboard
val processingEnv: ProcessingEnvironment