I have written an annotation processor. The user can pass an option as parameter for the processor. I can also read this parameter in my annotation processor. So far so good, everything works like expected!
However, I get a warning from the compiler, that the option passed to the annotation processor has not been recorgnized by any annotation processor:
Warning:The following options were not recognized by any processor: '[fragmentArgsLib]'
Actually, my processor has recognized and read this option successfully:
@Override public boolean process(Set<? extends TypeElement> type, RoundEnvironment env) {
String fragementArgsLib = processingEnv.getOptions().get("fragmentArgsLib");
...
}
I guess I have to say manually that I have used this option to make this compiler warning disappear. Does anyone of you know how to do that?
Found the answer, you have to specify which options are supported by your annotation processor by overriding getSupportedOptions()
or using @SupportedOptions
annotation (since java 7)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With