Skip to content

Instantly share code, notes, and snippets.

@Debdutta-Panda
Last active June 10, 2022 17:31
Show Gist options
  • Select an option

  • Save Debdutta-Panda/1938a8dc3977fa249188c8294c266652 to your computer and use it in GitHub Desktop.

Select an option

Save Debdutta-Panda/1938a8dc3977fa249188c8294c266652 to your computer and use it in GitHub Desktop.
MyMarker_phase_3_processor_skeleton
package com.debduttapanda.marker
import javax.annotation.processing.AbstractProcessor
import javax.annotation.processing.RoundEnvironment
import javax.annotation.processing.SupportedSourceVersion
import javax.lang.model.SourceVersion
import javax.lang.model.element.Element
import javax.lang.model.element.TypeElement
@SupportedSourceVersion(SourceVersion.RELEASE_8) // 1
class Processor : AbstractProcessor() { // 2
override fun getSupportedAnnotationTypes() =
mutableSetOf(Mark::class.java.canonicalName) // 3
override fun process(annotations: MutableSet<out TypeElement>?,
roundEnv: RoundEnvironment): Boolean { // 4
// TODO
return true // 5
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment