Class.forName底层原理
Class
Class.forName
public static Class> forName(String className)
throws ClassNotFoundException {
Class> caller = Reflection.getCallerClass(); // caller : class field.ClassForNameDemo
return forName0(className, true, ClassLoader.getClassLoader(caller), caller);
}
forName0
private static native Class> forName0(String name, boolean initialize,
共有 0 条评论