Retrieve the {@link ClassLoader} (if any) stored with the given {@link ClassLoaderIdentity}.

@return <code>null</code> if no {@link ClassLoader} has been stored or the {@link ClassLoader} has been collected.
427738
public V retrieve(K key) {
        Ref<V> ref = map.get(key);
        return ref == null ? null : ref.get();
    }
1114294
private ClassLoader getClassLoaderFromBundle(Object resource, String packageName, String versionRange)
    {
    	ClassLoader classLoader = null;
        if (resource == null)
        {
            Object classAccess = this.getClassBundleService(null, packageName + FAKE_CLASSNAME, versionRange, null, 0);
            if (classAccess != null)
            {
            	classLoader = classAccess.getClass().getClassLoader();
            }
        }
        else
        {
        	Bundle bundle = this.findBundle(resource, bundleContext, packageName, versionRange);
        	if (bundle == null)
        		return null;
        	@SuppressWarnings("unchecked")
			Enumeration<URL> entries = bundle.findEntries(packageName.replace('.', '/'), "*.class", true);
        	if (entries != null)
        		if (entries.hasMoreElements())
        	{	// This is kind of a hokey way to get the classloader from a bundle - find a class file and load it - but it works.
        		URL url = entries.nextElement();
        		String path = url.getFile();
        		int start = path.startsWith("/") ? 1 : 0;	// Path should always start at the root.
        		path = path.substring(start, path.lastIndexOf('.')).replace('/', '.');
        		try {
					classLoader = bundle.loadClass(path).getClassLoader();
				} catch (ClassNotFoundException e) {
					e.printStackTrace();
				}
        	}
        }
        return classLoader;
    }
433335
protected ClassLocator getClassLocator() {
    ClassLocator  	result;

    result = ClassLocator.getSingleton(m_ClassTraversal);
    if (result.isOnlyDefaultConstructor() != isOnlyDefaultConstructor())
      result.setOnlyDefaultConstructor(isOnlyDefaultConstructor());
    if (result.isOnlySerializable() != isOnlySerializable())
      result.setOnlySerializable(isOnlySerializable());

    return result;
  }
627697
public static ClassLoader getClassLoader(J2EEName beanName) {
        ClassLoader cl = null;
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2

        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "getClassLoader(" + beanName + ")");

        HomeInternal hi = homeOfHomes.getHome(beanName);
        if (hi != null) {
            cl = hi.getClassLoader();
        } else {
            if (isTraceOn && tc.isDebugEnabled())
                Tr.exit(tc, "getClassLoader: Home not found!");
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "getClassLoader: " + cl);

        return cl;
    }
1169280
public static <T> ExtensionLoader<T> getExtensionLoader(Class<T> clazz) {
        return getExtensionLoader(clazz, null);
    }
634666
private static ClassLoader getBootstrapClassLoader() {
        if (BOOTSTRAP_CLASSLOADER == null) {
            synchronized(ClassLoaderUtil.class) {
                if (BOOTSTRAP_CLASSLOADER == null) {
                    ClassLoader cl = null;
                    if (System.getSecurityManager() != null) {
                        cl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
                            @Override
                            public BootstrapClassLoader run() {
                                return new BootstrapClassLoader();
                            }
                        });
                    } else {
                        cl = new BootstrapClassLoader();
                    }
                    BOOTSTRAP_CLASSLOADER = cl;
                }
            }
        }
        return BOOTSTRAP_CLASSLOADER;
    }
563288
public static ClassLoader getContextClassLoader() {
        return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
            @Override
            public ClassLoader run() {
                ClassLoader cl = null;
                try {
                    cl = Thread.currentThread().getContextClassLoader();
                } catch (final SecurityException ex) {
                    // fall through
                }
                return cl;
            }
        });
    }
663736
private static ClassLoader getClassLoader() {
		ClassLoader ret = Thread.currentThread().getContextClassLoader();
		return ret != null ? ret : PathKit.class.getClassLoader();
	}
404608
public static ClassLoader getClassLoader(final Class<?> c)
   {
      if (System.getSecurityManager() == null)
         return c.getClassLoader();

      return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
      {
         public ClassLoader run()
         {
            return c.getClassLoader();
         }
      });
   }
41656
@Override
    public ClassLoader getClassLoader() {
        ClassLoader classLoader = this.initialClass.getClassLoader();
        if (classLoader == null) {
            classLoader = application.getClassLoader();
        }
        return classLoader;
    }
1121703
public static <T> T getInstance(String className, ClassLoader loader) {
        return getInstance(loadClass(className, loader));
    }
421493
public static TypeRegistry getTypeRegistryFor(ClassLoader classloader) {
		if (classloader == null) {
			return null;
		}
		//WeakReference<TypeRegistry> existingRegistryRef = loaderToRegistryMap.get(classloader);
		TypeRegistry existingRegistry = loaderToRegistryMap.get(classloader);//existingRegistryRef==null?null:existingRegistryRef.get();
		if (existingRegistry != null) {
			return existingRegistry;
		}

		if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {
			if (excludedLoaderInstances.contains(classloader.toString())) {
				return null;
			}
		}
		String classloaderName = classloader.getClass().getName();
		if (classloaderName.equals("sun.reflect.DelegatingClassLoader")) {
			return null;
		}
		for (String excluded : excludedLoaders) {
			if (classloaderName.startsWith(excluded)) {
				if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.FINEST)) {
					log.info("Classloader " + classloaderName + " has been deliberately excluded");
				}
				excludedLoaderInstances.add(classloader.toString());
				return null;
			}
		}
		//		if (GlobalConfiguration.limit) {
		//			// only allow for certain loaders!
		//			boolean isOK = false;
		//			if (classloaderName.equals("org.apache.catalina.loader.StandardClassLoader")) {
		//				isOK = true;
		//			} else if (classloaderName.equals("com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader")) {
		//				isOK = true;
		//			} else if (classloaderName.equals("org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader")) {
		//				isOK = true;
		//			} else if (classloaderName.equals("org.apache.catalina.loader.WebappClassLoader")) {
		//				isOK = true;
		//			}
		//			if (!isOK) {
		//				return null;
		//			}
		//		}

                try {
                    Class.forName("org.springsource.loaded.ri.ReflectiveInterceptor", false, classloader);
                } catch (ClassNotFoundException ex) {
                    if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {
                            log.info("No TypeRegistry (can't load ReflectiveInterceptor) for loader " + classloader);
                    }
                    return null;
                }

		if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {
			log.info("TypeRegistry.getRegistryFor(): creating new TypeRegistry for loader " + classloader);
		}

		TypeRegistry tr = new TypeRegistry(classloader);
		//		if (GlobalConfiguration.isRuntimeLogging) {
		//			Utils.log(100, "TypeRegistry.getTypeRegistryFor(classloader=" + classloader + ") returning " + tr);
		//		}
		return tr;
	}
1297439
public static ClassLoader getClassLoader() {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        if (cl == null) {
            cl = ClassLoader.getSystemClassLoader();
            if (cl == null) {
                // When this method is called for initializing a ICU4J class
                // during bootstrap, cl might be still null (other than Android?).
                // In this case, we want to use the bootstrap class loader.
                cl = getBootstrapClassLoader();
            }
        }
        return cl;
    }
1363286
public TypeSignature getTypeSignature() {
        if (typeSignatureStr == null) {
            return null;
        }
        if (typeSignature == null) {
            try {
                typeSignature = TypeSignature.parse(typeSignatureStr, declaringClassName);
                typeSignature.setScanResult(scanResult);
            } catch (final ParseException e) {
                throw new IllegalArgumentException(e);
            }
        }
        return typeSignature;
    }
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;
    }
953924
public static Optional<EmbeddedJdbcDatabase> get(ClassLoader classLoader) {
        return databases
            .stream()
            .filter(JdbcDatabase::isEmbedded)
            .map(EmbeddedJdbcDatabase.class::cast)
            .filter(embeddedDatabase -> ClassUtils.isPresent(embeddedDatabase.getDriverClassName(), classLoader))
            .findFirst();
    }
441985
static JClassLoader getSystemClassLoader()
  {
    if (_staticClassLoader == null)
      _staticClassLoader = JClassLoaderWrapper.create(ClassLoader.getSystemClassLoader());

    return _staticClassLoader;
  }