Class<?> findClass(String name, boolean checkParent) throws ClassNotFoundException { ClassLoader parentCL = getParentClassLoader(); if (checkParent && parentCL != null && name.startsWith(JAVA_PACKAGE)) // 1) if startsWith "java." delegate to parent and terminate search // we want to throw ClassNotFoundExceptions if a java.* class cannot be loaded from the parent. return parentCL.loadClass(name); return findClassInternal(name, checkParent, parentCL); }
public Enumeration<URL> getResources(String name) throws IOException { if ((name.length() > 1) && (name.charAt(0) == '/')) /* if name has a leading slash */ name = name.substring(1); /* remove leading slash before search */ String pkgName = getResourcePackageName(name); // follow the OSGi delegation model // First check the parent classloader for system resources, if it is a java resource. Enumeration<URL> result = null; if (pkgName.startsWith(JAVA_PACKAGE) || bundle.getFramework().isBootDelegationPackage(pkgName)) { // 1) if startsWith "java." delegate to parent and terminate search // 2) if part of the bootdelegation list then delegate to parent and continue of failure ClassLoader parentCL = getParentClassLoader(); result = parentCL == null ? null : parentCL.getResources(name); if (pkgName.startsWith(JAVA_PACKAGE)) return result; } return compoundEnumerations(result, findResources(name)); }
public Enumeration<URL> getResources(String name) throws IOException { if ((name.length() > 1) && (name.charAt(0) == '/')) /* if name has a leading slash */ name = name.substring(1); /* remove leading slash before search */ String pkgName = getResourcePackageName(name); // follow the OSGi delegation model // First check the parent classloader for system resources, if it is a java resource. Enumeration<URL> result = null; if (pkgName.startsWith(JAVA_PACKAGE) || bundle.getFramework().isBootDelegationPackage(pkgName)) { // 1) if startsWith "java." delegate to parent and terminate search // 2) if part of the bootdelegation list then delegate to parent and continue of failure ClassLoader parentCL = getParentClassLoader(); result = parentCL == null ? null : parentCL.getResources(name); if (pkgName.startsWith(JAVA_PACKAGE)) return result; } return compoundEnumerations(result, findResources(name)); }
Class<?> findClass(String name, boolean checkParent) throws ClassNotFoundException { ClassLoader parentCL = getParentClassLoader(); if (checkParent && parentCL != null && name.startsWith(JAVA_PACKAGE)) // 1) if startsWith "java." delegate to parent and terminate search // we want to throw ClassNotFoundExceptions if a java.* class cannot be loaded from the parent. return parentCL.loadClass(name); try { if (USE_GLOBAL_DEADLOCK_AVOIDANCE_LOCK) lock(createClassLoader()); return findClassInternal(name, checkParent, parentCL); } finally { if (USE_GLOBAL_DEADLOCK_AVOIDANCE_LOCK) unlock(); } }
policiesSnapshot[policyOrder] = new SystemPolicy(policedLoader.getParentClassLoader()); return (IBuddyPolicy) policiesSnapshot[policyOrder];
policiesSnapshot[policyOrder] = new SystemPolicy(policedLoader.getParentClassLoader()); return (IBuddyPolicy) policiesSnapshot[policyOrder];
policiesSnapshot[policyOrder] = new SystemPolicy(policedLoader.getParentClassLoader()); return (IBuddyPolicy) policiesSnapshot[policyOrder];
policiesSnapshot[policyOrder] = new SystemPolicy(policedLoader.getParentClassLoader()); return (IBuddyPolicy) policiesSnapshot[policyOrder];
policiesSnapshot[policyOrder] = new SystemPolicy(policedLoader.getParentClassLoader()); return (IBuddyPolicy) policiesSnapshot[policyOrder];
policiesSnapshot[policyOrder] = new SystemPolicy(policedLoader.getParentClassLoader()); return (IBuddyPolicy) policiesSnapshot[policyOrder];
policiesSnapshot[policyOrder] = new SystemPolicy(policedLoader.getParentClassLoader()); return (IBuddyPolicy) policiesSnapshot[policyOrder];
policiesSnapshot[policyOrder] = new SystemPolicy(policedLoader.getParentClassLoader()); return (IBuddyPolicy) policiesSnapshot[policyOrder];
String pkgName = getResourcePackageName(name); boolean bootDelegation = false; ClassLoader parentCL = getParentClassLoader();
String pkgName = getResourcePackageName(name); boolean bootDelegation = false; ClassLoader parentCL = getParentClassLoader();