Java tutorial
import java.lang.annotation.Annotation; public class Main { public static void main(String[] args) { Main cls = new Main(); Class c = cls.getClass(); Annotation[] a = c.getAnnotations(); for (Annotation val : a) { System.out.println(val.toString()); } } }