Closed azurvii closed 3 months ago
Does AnnotationsToApply
address your use case?
Yes! Though it seems awkward to use. I guess it's how to accommodate annotations with values.
We spent a lot of time designing it. 🙂 This was the best compromise we could find between power and convenience.
Thanks Éamonn! Sorry if I sounded negative. This is a "wow" I learn here. Got used to implementing
and extending
, I was expecting something similar.
Minor suggestion to put AnnotationsToApply
in @see
of implementing
and extending
to raise its visibility. Or maybe another better place. Though in the same file, the auto-complete-dependent me had not noticed this.
Currently
@AutoFactory
supportsimplementing
andextending
. I suggest to addannotating
, which should take a list ofClass<?>
(@interface
to be exact, but I think java does not have a grammar to support this. Also, compiler should pick this up easily, if any class is not an annotation, so this should be no big issue). These should be annotated on the generated factories.One use case is to cooperate with Quarkus, which requires a scope on the class to be injected. I think this could benefit other annotation processors as well.