日期:2014-05-20 浏览次数:20966 次
public static void main(String[] args)throws Exception {
Class c = Class.forName("test.T");
Method method = c.getDeclaredMethod("say", new Class[]{});
Annotation[] as = method.getAnnotations();
for(Annotation a : as){
System.out.println(a.annotationType().getSimpleName());
}
}
------解决方案--------------------
一个系统是没有办法解释自身的,必须借助外面的系统来描述自身,也就是说任何一个系统都不是完备的, 如果它完备,它就是自相矛盾的。