Java examples for java.lang.annotation:Class Annotation
find Class Annotation
//package com.java2s; import java.lang.annotation.Annotation; public class Main { public static void main(String[] argv) throws Exception { Class clazz = String.class; System.out.println(java.util.Arrays .toString(findClassAnnotation(clazz))); }// w w w . j a va 2 s. co m public static Annotation[] findClassAnnotation(Class<?> clazz) { return clazz.getAnnotations(); } }