Having a Weld-specific @Mandatory annotation would mean your application will depend on Weld API. And this is not always a good idea (e.g. portability). I'm wondering whether having a configuration property to define the Weld behavior for this particular use-case (see also Weld configuration) would be a better solution? The truth is the annotation approach is more fine-grained whereas the configuration is scoped to the application.
|