devxlogo

June 5, 2019

Get the Class-Level Annotation

Via Java Reflection API, we can obtain all the annotations of a class as follows: Class clazz = Foo.class;Annotation[] clazzAnnotations = clazz.getAnnotations();