fix : add toolkit

pull/880/head
pizihao 3 years ago
parent cc52829e24
commit 3944ab7673

@ -26,7 +26,7 @@ import java.lang.management.MemoryUsage;
/** /**
* memory util<br> * memory util<br>
* the obtained information is not invalid, after a long wait, obtain it again * the obtained information is not real time effective, after a long wait, please get it again
* *
* @author liuwenhao * @author liuwenhao
*/ */

@ -250,4 +250,18 @@ public class ReflectUtil {
throw new IllegalException(e); throw new IllegalException(e);
} }
} }
/**
* get instance
*
* @param cls the class
* @return new Instance
*/
public static Object createInstance(Class<?> cls) {
try {
return cls.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
throw new IllegalException(e);
}
}
} }

Loading…
Cancel
Save