-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDI Stereotypes #245
Comments
@dblevins: Something for the 'Related' section that I'm sure you'll love to hear about: the MP GraphQL team is working on supporting Stereotypes (and more), too. We try to extract that into a separate standard (for lack of a better name it's code named power annotations), to make it easier for others to adopt, as the more implementations and standards support it, the better for everybody. The current implementation is based on Jandex so everything Quarkus should work out of the box (testing is ongoing); but the api is agnostic and the TCK should be able to test any other implementation, too. We'd be very happy to hear what you think! |
Having something like Stereotypes that's generic to plain Java has been the dream. Any efforts to support it are incredibly welcome. A recommendation on a better name is "Meta Annotations". I've tried to convince a handful of people on the Java SE team of its merit but haven't gotten far. If you guys are interested in a generic proposal not connected to CDI, let's collaborate. Several years ago I created this generic library that passively added support for a new "@metatype" annotation. We could potentially create a new very thin spec project, add something like 'jakarta.meta.Metatype' and expand the idea. Looks like you've got some Mixin concept I'd definitely like to learn more about. I never actually liked "Stereotype" as a name as "stereo" has kind of a narrow "two" definition; does that imply the other annotations are "Monotypes"?; what if the annotation implies multiple things? I like "meta-annotation" as "meta" means "referring to itself or to the conventions of its genre; self-referential", which is great for annotations that describe annotations or, more accurately, an annotation that uses annotations to describe itself. |
I was curious, so I looked it up: stereotype translates as solid-print; the meaning 'two' is just a coincidence. I'm fine with calling it MetaTypes, esp. as stereotypes applied to people has such a negative connotation; but renaming it may be an additional effort when struggling for acceptance; and Stereotype has a strong UML background. I was aware of your metatype project and IIRC we talked about it at Devoxx BE. Then I actually experimented with an annotation processor to do the resolution at compile time. It works even with EJB annotations like A request for mixins actually was the trigger for this in the MP GraphQL community. Sometimes you really need mixins so you can add annotations to classes you don't own. You're probably aware that Spring has meta annotations with a lot of additional features. The JEE world needs something similar. Maybe now is the time for trying to push the topic again... step by step; Microprofile may be a chance to get this widely supported. Should we perhaps create a sandbox project? |
TODO
Proposals
Related
The text was updated successfully, but these errors were encountered: