JsonClassCodegenProcessor

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

Constructors

JsonClassCodegenProcessor
Link copied to clipboard
fun JsonClassCodegenProcessor()

Types

Companion
Link copied to clipboard
object Companion

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
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
hashCode
Link copied to clipboard
open override fun hashCode(): Int
init
Link copied to clipboard
open override fun init(processingEnv: ProcessingEnvironment)
isInitialized
Link copied to clipboard
open override fun isInitialized(): Boolean
process
Link copied to clipboard
open override fun process(annotations: Set<TypeElement>, roundEnv: RoundEnvironment): Boolean
toString
Link copied to clipboard
open override fun toString(): String

Properties

initialized
Link copied to clipboard
override val initialized: Boolean
processingEnv
Link copied to clipboard
override val processingEnv: ProcessingEnvironment