Having a class:
@MarkerForKapt
@AnotherAnnotation(withParameter = "X")
class MyClass
And a processor:
class MyProcessor : AbstractProcessor() {
override fun getSupportedAnnotationTypes() = setOf(MarkerForKapt::class.qualifiedName)
override fun process(annotations: Set<TypeElement>, roundEnv: RoundEnvironment): Boolean {
val element = roundEnv.getElementsAnnotatedWith(MarkerForKapt::class.java).single()
}
}
How to read value "X"
from @AnotherAnnotation
?
Add rt.jar to configuration:
build.gradle.kts
:Processor: