Gets the {@link java.lang.ClassLoader} that must be used to load user code classes.

@return The user code ClassLoader.
426447
public ClassLoader getUserCodeClassLoader() {
		if (this.userCodeClassLoader == null) {
			this.userCodeClassLoader = buildUserCodeClassLoader(jarFiles, classpaths, getClass().getClassLoader());
		}
		return this.userCodeClassLoader;
	}
1364896
public static ClassLoader getClassLoader(Class clazz){
        ClassLoader classLoader = clazz.getClassLoader();
        return classLoader==null ? ClassLoader.getSystemClassLoader() : classLoader;
    }
210367
public static final ClassLoader getContextLoader() {
		return CClassLoader.contextLoader.get() != null ? (CClassLoader) ((WeakReference) CClassLoader.contextLoader
				.get()).get()
				: null;
	}
82827
public static Class<?> getCallingClass() {
        ClassContextSecurityManager securityManager = getSecurityManager();
        if (securityManager == null)
            return null;
        Class<?>[] trace = securityManager.getClassContext();
        String thisClassName = Util.class.getName();

        // Advance until Util is found
        int i;
        for (i = 0; i < trace.length; i++) {
            if (thisClassName.equals(trace[i].getName()))
                break;
        }

        // trace[i] = Util; trace[i+1] = caller; trace[i+2] = caller's caller
        if (i >= trace.length || i + 2 >= trace.length) {
            throw new IllegalStateException("Failed to find org.slf4j.helpers.Util or its caller in the stack; " + "this should not happen");
        }

        return trace[i + 2];
    }
1030648
private ClassLoader getCombinedClassLoader(ClassRealmManager manager) {

        List<URL> urlList = new ArrayList<URL>();

        // add thread classpath
        ClassLoader threadCL = SecurityActions.getThreadContextClassLoader();
        if (threadCL instanceof URLClassLoader) {
            urlList.addAll(Arrays.asList(((URLClassLoader) threadCL).getURLs()));
        }

        // add maven core libraries
        ClassRealm core = manager.getCoreRealm();
        if (core != null) {
            urlList.addAll(Arrays.asList(core.getURLs()));
        }

        ClassRealm mavenApi = manager.getMavenApiRealm();
        if (mavenApi != null) {
            urlList.addAll(Arrays.asList(mavenApi.getURLs()));
        }

        // we need to keep threadCL as parent, otherwise we'll get ClassCastException in runtime
        URLClassLoader cl = new URLClassLoader(urlList.toArray(new URL[0]), threadCL);

        // for (URL u : cl.getURLs()) {
        // System.out.println("CLR: " + u);
        // }

        return cl;
    }
1135316
public static List<ClassLoader> getClassLoaders() {
        ClassLoader[] classLoaders = new ClassLoader[2];
        classLoaders[0] = FileUtils.class.getClassLoader();
        classLoaders[1] = Thread.currentThread().getContextClassLoader();

        // Clean up possible null values. Note that #getClassLoader may return a null value.
        List<ClassLoader> loaders = new ArrayList<ClassLoader>(classLoaders.length);
        for (ClassLoader classLoader : classLoaders) {
            if (classLoader != null) {
                loaders.add(classLoader);
            }
        }
        return loaders;
    }
246328
public static Class<?> getUserClass(Class<?> clazz) {
        if (clazz.getName().contains(CGLIB_CLASS_SEPARATOR)) {
            Class<?> superclass = clazz.getSuperclass();
            if (superclass != null && Object.class != superclass) {
                return superclass;
            }
        }
        return clazz;
    }
580697
public static PropertiesLoader getPropertiesLoader() {
		synchronized (PropertiesLoader.class) {
			final ClassLoader classLoader = ConfigurableClassLoader.INSTANCE.getClassLoader();
			PropertiesLoader loader = clMap.get(classLoader);
			if (loader == null) {
				try {
					loader = new PropertiesLoader(MASTER_PLUGIN_FILE, EXTRA_PLUGIN_FILE);
					clMap.put(classLoader, loader);
				} catch (final IOException ex) {
					throw new RuntimeException(ex);
				}
			}
			return loader;
		}
	}
1225467
public static final CClassLoader getRootLoader() {
		if (CClassLoader.rootLoader == null) {
			CClassLoader.rootLoader = CClassLoader.createLoader(
					CClassLoader.class.getClassLoader(),
					CClassLoader.ROOT_LOADER);
		}
		return CClassLoader.rootLoader;
	}
663736
private static ClassLoader getClassLoader() {
		ClassLoader ret = Thread.currentThread().getContextClassLoader();
		return ret != null ? ret : PathKit.class.getClassLoader();
	}
1294141
public static Class<?> getClass(ClassLoader classLoader, String className) {
        try {

            final Class<?> clazz;

            if (PRIMITIVE_MAPPING.containsKey(className)) {

                String qualifiedName = "[" + PRIMITIVE_MAPPING.get(className);
                clazz = Class.forName(qualifiedName, true, classLoader).getComponentType();
            } else {
                clazz = Class.forName(determineQualifiedName(className), true, classLoader);
            }
            return clazz;
        } catch (ClassNotFoundException ex) {

            int lastSeparatorIndex = className.lastIndexOf(PACKAGE_SEPARATOR_CHARACTER);

            if (lastSeparatorIndex != -1) {
                return getClass(classLoader, className.substring(0, lastSeparatorIndex) + INNER_CLASS_SEPARATOR_CHAR
                        + className.substring(lastSeparatorIndex + 1));
            }
            throw new IllegalArgumentException("Unable to unmarshall String to Class: " + className);
        }
    }
310764
public static ClassLoader getContextClassLoader() {
        ClassLoader loader = null;
        try {
            loader = Thread.currentThread().getContextClassLoader();
        } catch (Throwable e) {
        }
        if (loader == null) {
            loader = ClassUtils.class.getClassLoader();
        }
        return loader;
    }
642756
public static ClassLoader getParentClassLoader() {
		logger.debug("getParentClassLoader() invoked, web start mode: {}", IS_WEB_START);
		if (IS_WEB_START) {
			return Thread.currentThread().getContextClassLoader();
		} else {
			return ClassLoaderUtils.class.getClassLoader();
		}
	}
1228106
public Class<?> getClassType() {
        try {
            return Class.forName(getType(), true, ClassLoaderHolder.getClassLoader());
        } catch (ClassNotFoundException e) {
            throw new IllegalStateException(e);
        }
    }
772768
public static LibraryLoader loader() {
        String type = System.getProperty("com.lambdaworks.jni.loader");

        if (type != null) {
            if (type.equals("sys")) return new SysLibraryLoader();
            if (type.equals("nil")) return new NilLibraryLoader();
            if (type.equals("jar")) return new JarLibraryLoader();
            throw new IllegalStateException("Illegal value for com.lambdaworks.jni.loader: " + type);
        }

        String vmSpec = System.getProperty("java.vm.specification.name");
        return vmSpec.startsWith("Java") ? new JarLibraryLoader() : new SysLibraryLoader();
    }
653899
private static ClassLoader getParentCl()
    {
        try
        {
            Method m = ClassLoader.class.getMethod("getPlatformClassLoader");
            return (ClassLoader) m.invoke(null);
        }
        catch (NoSuchMethodException e)
        {
            // Java < 9, just use the bootstrap CL.
            return null;
        }
        catch (Exception e)
        {
            throw new JqmInitError("Could not fetch Platform Class Loader", e);
        }
    }
1050886
public static Class get(String clazzname, ClassLoader loader) throws ClassNotFoundException {
        return Util.loadClass(clazzname, loader != null? loader : ClassConfigurator.class.getClassLoader());
    }