{//获取对象的所有接口 Class<?>[] allInterfaces = ClassUtils.getAllInterfaces(ClassUtils.class); System.out.println(allInterfaces[0].getName()); } {//获取某个类的包名 String packageName = ClassUtils.getPackageName(ClassUtils.class); System.out.println(packageName); }
标签:allInterfaces,System,springframework,class,util,org,ClassUtils From: https://www.cnblogs.com/ooo0/p/17751562.html