cdi
cdi copied to clipboard
Add "addBeanDefiningAnnotation" method
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
.