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

arrow.generic.CoproductProcessor.kt Maven / Gradle / Ivy

package arrow.generic

import arrow.common.utils.AbstractProcessor
import arrow.coproduct
import com.google.auto.service.AutoService
import javax.annotation.processing.Processor
import javax.annotation.processing.RoundEnvironment
import javax.lang.model.SourceVersion
import javax.lang.model.element.TypeElement

@AutoService(Processor::class)
class CoproductProcessor : AbstractProcessor() {

  override fun getSupportedSourceVersion(): SourceVersion = SourceVersion.latestSupported()

  override fun getSupportedAnnotationTypes(): Set = setOf(coproduct::class.java.canonicalName)

  override fun onProcess(annotations: Set, roundEnv: RoundEnvironment) {
    generateCoproducts(filer)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy