通过反射打印注释
//package com.nowjava; import java.lang.annotation.Annotation;/**来自 N o w J a v a . c o m**/ import static java.lang.System.out; public class Main { public static void printAnnotations(Class<?> c) { Annotation[] annotations = c.getAnnotations(); out.format("Annotation => %n"); if (annotations.length == 0) { out.format(" --%s", "No declared annotation found"); } else { for (Annotation a : annotations) { out.format(