A CDI stereotype allows us to create new annotations that bundle together several CDI annotations. For example, if we needed to create several CDI named beans with a scope of session, we would have to use two annotations in each of these beans, namely
@SessionScoped. Instead of having to add two annotations to each of our beans, we could create a stereotype, and then annotate our beans with it.
To create a CDI stereotype in NetBeans, we simply need to create a new file, selecting the Contexts and Dependency Injection category and the Stereotype file type.
We then need to enter a name and package for our new Stereotype.
At this ...