Now that you have learned how to declare annotations and how to attach them to classes and methods, we can return to our ProductInformation class. You may recall that we wanted to specify the type of products in this class and that each product type is represented by an @interface annotation. We have already listed it in the previous few pages, the one we will implement in our @PoweredDevice example. We will develop the code assuming that later, there will be many such annotations, product types, and consistency checkers that are annotated with @Component and with one or more of our annotations.
Using reflection
Getting annotations
We will extend the ProductInformation class with the following field:
private List<Class...