cdi icon indicating copy to clipboard operation
cdi copied to clipboard

Add "addBeanDefiningAnnotation" method

Open arjantijms opened this issue 5 months ago • 7 comments

A library (possibly another spec in Jakarta EE) can currently add custom bean defining annotations using MetaAnnotations.addStereotype. This is however quite ugly and just uses the side-effect that stereo types are bean defining.

Implementations like Weld have an explicit method for this. See https://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#_extending_bean_defining_annotations

I would like to propose adding a method so libraries can add their own custom bean defining annotations, e.g. using MetaAnnotations.addBeanDefiningAnnotation.

arjantijms avatar Sep 06 '24 10:09 arjantijms