Class annotations can be inspected via reflection as follows:
Class clazz = Foo.class; Annotation[] clazzAnnotations = clazz.getAnnotations();