protected Class<?> loadClass(String name, boolean resolve, boolean followImports) throws ClassNotFoundException { // First, check if the class has already been loaded Class c = findLoadedClass(name); if (c == null) { try { if (getParent() != null) { c = getParent().loadClass(name); } } catch (ClassNotFoundException e) { } if (c == null) { c = findClass(name, followImports); } if (resolve) { resolveClass(c); } } else { if (c.getClassLoader() == this) { return c; } else throw new ClassNotFoundException(name); } return c; }
protected Class<?> loadClass(String name, boolean resolve, boolean followImports) throws ClassNotFoundException { // First, check if the class has already been loaded Class c = findLoadedClass(name); if (c == null) { try { if (getParent() != null) { c = getParent().loadClass(name); } } catch (ClassNotFoundException e) { } if (c == null) { c = findClass(name, followImports); } if (resolve) { resolveClass(c); } } else { if (c.getClassLoader() == this) { return c; } else throw new ClassNotFoundException(name); } return c; }