I am creating Annotation processor with annotation that takes class names, check if the name is CamelCase and writes all the classes which don't use camelcase.
This is the function which writes all those classes:
private fun checkCamelVariable(classElement: TypeElement) {
classElement.enclosedElements.filter {
!it.simpleName.toString().isDefinedCamelCase()
}.forEach {
printWarning("Detected non-camelcase name: ${it.simpleName}.")
}
}
In my build log i get:
warning: Detected non-camelcase name: TAG.[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: com.example.processor.GenerateProcessor (NON_INCREMENTAL), com.google.auto.service.processor.AutoServiceProcessor (NON_INCREMENTAL).
Which means my annotation is working but I can not get the class names. Looked on places like this: How to get rid of Incremental annotation processing requested warning?
but none of suggestions helped me.