snaker-core/src/main/java/org/snaker/engine/helper/ClassHelper.java
public static <T> T instantiate(Class<T> clazz) {
		if (clazz.isInterface()) {
			log.error("所传递的class类型参数为接口，无法实例化");
			return null;
		}
		try {
			return clazz.newInstance();
		} catch (Exception ex) {
			log.error("检查传递的class类型参数是否为抽象类?", ex.getCause());
		}
		return null;
	}
public static <T> T instantiate(Class<T> clazz) {
		if (clazz.isInterface()) {
			log.error("所传递的class类型参数为接口，无法实例化");
			return null;
		}
		try {
			return clazz.newInstance();
		} catch (Exception ex) {
			log.error("检查传递的class类型参数是否为抽象类?", ex.getCause());
		}
		return null;
	}
public static < T > T instantiate ( Class < T > clazz ) { if ( clazz . isInterface ( ) ) { log . error ( "所传递的class类型参数为接口，无法实例化"); return null ; } try { return clazz . newInstance ( ) ; } catch ( Exception ex ) { log . error ( "检查传递的class类型参数是否为抽象类?", ex.getCause()); } return null ; }
根据类的class实例化对象
@param clazz
@return
根据类的class实例化对象