net.linksfield.cube.partnersdk.utils.ReflectUtils Maven / Gradle / Ivy
package net.linksfield.cube.partnersdk.utils;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @ClassName ReflectUtils
* @Description TODO
* @Author James.hu
* @Date 2023/4/7
**/
public class ReflectUtils {
public static T newInstance(Class clazz) {
try {
return clazz.getConstructor().newInstance();
} catch (InstantiationException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
throw new RuntimeException(e);
} catch (NoSuchMethodException e) {
throw new RuntimeException(e);
}
}
public static List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy