spring源码不理解的问题
最近闲来无事,于是阅读spring源码,读着读着碰到一个问题百思不得其解,问题在BeanUtils中的一段代码,如下:
public static <T> T instantiateClass(Class<T> clazz) throws BeanInstantiationException {Assert.notNull(clazz, "Class must not be null");if (clazz.isInterface()) {throw new BeanInstantiationException(clazz, "Specified class is an interface");}try {return instantiateClass(clazz.getDeclaredConstructor());}catch (NoSuchMethodException ex) {throw new BeanInstantiationException(clazz, "No default constructor found", ex);}}