September 2019
Intermediate to advanced
816 pages
18h 47m
English
Having multiple annotations of the same type on certain components, we can fetch all of them via getAnnotationsByType(). For a class, we can do it as follows:
Class<Melon> clazz = Melon.class;Fruit[] clazzFruitAnnotations = clazz.getAnnotationsByType(Fruit.class);