Loads the {@link org.apache.logging.log4j.spi.ThreadContextMap} class specified by this Provider.

@return the ThreadContextMap implementation class or {@code null} if there was an error loading it
772375
public Class<? extends ThreadContextMap> loadThreadContextMap() {
        if (threadContextMapClass != null) {
            return threadContextMapClass;
        }
        if (threadContextMap == null) {
            return null;
        }
        final ClassLoader loader = classLoader.get();
        if (loader == null) {
            return null;
        }
        try {
            final Class<?> clazz = loader.loadClass(threadContextMap);
            if (ThreadContextMap.class.isAssignableFrom(clazz)) {
                return clazz.asSubclass(ThreadContextMap.class);
            }
        } catch (final Exception e) {
            LOGGER.error("Unable to create class {} specified in {}", threadContextMap, url.toString(), e);
        }
        return null;
    }
969231
public static final CThreadContext getInstance() {
		SoftReference ref = (SoftReference)CThreadContext.contextLocal
				.get(Thread.currentThread());
		CThreadContext context = null;
		if ((ref == null) || (ref.get() == null)) {
			context = new CThreadContext();
			ref = new SoftReference(context);
			CThreadContext.contextLocal.put(Thread.currentThread(), ref);
		} else {
			context = (CThreadContext)ref.get();
		}
		return context;
	}
1262854
public Class<? extends LoggerContextFactory> loadLoggerContextFactory() {
        if (loggerContextFactoryClass != null) {
            return loggerContextFactoryClass;
        }
        if (className == null) {
            return null;
        }
        final ClassLoader loader = classLoader.get();
        if (loader == null) {
            return null;
        }
        try {
            final Class<?> clazz = loader.loadClass(className);
            if (LoggerContextFactory.class.isAssignableFrom(clazz)) {
                return clazz.asSubclass(LoggerContextFactory.class);
            }
        } catch (final Exception e) {
            LOGGER.error("Unable to create class {} specified in {}", className, url.toString(), e);
        }
        return null;
    }
984336
@SuppressWarnings("rawtypes")
  public Class getException() {
    try {
      return Class.forName(errorParam, true, Thread.currentThread().getContextClassLoader()).newInstance().getClass();
    } catch (Exception e) {
      return null;
    }
  }
668261
public static ClassLoader getClassLoader(Class<?> clazz) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        if (loader != null) {
            return loader;
        }
        if (clazz != null) {
            loader = clazz.getClassLoader();
            if (loader != null) {
                return loader;
            }
        }
        return ClassLoader.getSystemClassLoader();
    }
1174805
public static Class loadClass(Class loadClass,String name)
        throws ClassNotFoundException
    {
        ClassNotFoundException cnfe=null;
        ClassLoader loader=Thread.currentThread().getContextClassLoader();
        if (loader!=null)
        {
            try
            {
               return loader.loadClass(name);
            }
            catch (ClassNotFoundException e)
            {
               cnfe=e;
            }
        }

        loader=loadClass.getClassLoader();
        if (loader!=null)
        {
            try
            {
               return loader.loadClass(name);
            }
            catch (ClassNotFoundException e)
            {
               if(cnfe==null)cnfe=e;
            }
        }


       try
       {
            return Class.forName(name);
       }
       catch (ClassNotFoundException e)
       {
            if(cnfe==null)cnfe=e;
	    throw cnfe;
       }

    }
663736
private static ClassLoader getClassLoader() {
		ClassLoader ret = Thread.currentThread().getContextClassLoader();
		return ret != null ? ret : PathKit.class.getClassLoader();
	}
873638
private Class<?> loadClass(final String classname) throws PluginException {
        if (null == classname) {
            throw new IllegalArgumentException("A null java class name was specified.");
        }
        if (null != classCache.get(classname)) {
            return classCache.get(classname);
        }
        CachedJar cachedJar1 = getCachedJar();

        debug("loadClass! " + classname + ": " + cachedJar1.getCachedJar());
        final Class<?> cls;
        final URLClassLoader urlClassLoader = cachedJar1.getClassLoader();
        try {
            cls = Class.forName(classname, true, urlClassLoader);
            classCache.put(classname, cls);
        } catch (ClassNotFoundException e) {
            throw new PluginException("Class not found: " + classname, e);
        } catch (Throwable t) {
            throw new PluginException("Error loading class: " + classname, t);
        }
        return cls;
    }
1115532
@Override
    @SuppressWarnings("rawtypes")
    @FFDCIgnore(ClassNotFoundException.class)
    public Class loadClass(String name, String codebase, ClassLoader loader) throws ClassNotFoundException {
        try {
            return super.loadClass(name, codebase, loader);
        } catch (ClassNotFoundException e) {
            // Fix #2: use context class loader to allow _Intf_Stub to be
            // loaded from a different loader than Intf (or to be dynamically
            // generated if needed).
            ClassLoader contextClassLoader = threadContextAccessor.getContextClassLoaderForUnprivileged(Thread.currentThread());
            if (contextClassLoader != loader && name.endsWith("_Stub")) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    Tr.debug(tc, "retrying with " + contextClassLoader);
                try {
                    return contextClassLoader.loadClass(name);
                } catch (ClassNotFoundException e2) {
                }
            }
            throw e;
        }
    }
171766
@Override
  public Class<?> loadClassImpl(String name, boolean resolve)
    throws ClassNotFoundException
  {
    // The JVM has already cached the classes, so we don't need to
    Class<?> cl = findLoadedClass(name);

    if (cl != null) {
      if (resolve)
        resolveClass(cl);
      return cl;
    }
    // System.out.println("ROOT: " + name);
    if (_classNotFoundCache.get(name) != null) {
      return null;
    }
    
    try {
      cl = super.loadClassImpl(name, resolve);
    } catch (ClassNotFoundException e) {
      _classNotFoundCache.put(name, name);
      
      throw e;
    }
    
    if (cl == null) {
      _classNotFoundCache.put(name, name);
    }
    
    return cl;
  }
192869
private Class<?> attemptFromContextLoader(final String driverClassName) {
      final ClassLoader threadContextClassLoader = Thread.currentThread().getContextClassLoader();
      if (threadContextClassLoader != null) {
         try {
            final Class<?> driverClass = threadContextClassLoader.loadClass(driverClassName);
            LOGGER.debug("Driver class {} found in Thread context class loader {}", driverClassName, threadContextClassLoader);
            return driverClass;
         } catch (ClassNotFoundException e) {
            LOGGER.debug("Driver class {} not found in Thread context class loader {}, trying classloader {}",
               driverClassName, threadContextClassLoader, this.getClass().getClassLoader());
         }
      }

      return null;
   }
315293
public com.google.api.Context getContext() {
    return context_ == null ? com.google.api.Context.getDefaultInstance() : context_;
  }
524500
@Nonnull
  public ClassLoader getClassLoader ()
  {
    return m_aBestCandidate == null ? Thread.currentThread ().getContextClassLoader ()
                                    : m_aBestCandidate.getClassLoader ();
  }
1298568
protected final Class loadClass(final String name, final boolean resolve)
			throws ClassNotFoundException {
		final CThreadContext context = CThreadContext.getInstance();
		try {
			Class c = null;
			final WeakReference cache = (WeakReference) this.cacheMap.get(name);
			if (cache != null) {
				c = (Class) cache.get();
			}

			if (c == null) {
				// First, check if the class has already been loaded
				c = this.findLoadedClass(name);
				if (c == null) {
					c = this.findClass(name);
					this.cacheMap.put(name, new WeakReference(c));
				}
			}
			if (resolve) {
				this.resolveClass(c);
			}

			return c;
		} finally {
			context.set(CClassLoader.CCLASSLOADER_NAMESPACE + name, null);
			try {

			} catch (final Exception ignore) {
			}
		}
	}
399180
private ThreadLocal<StringMap> createThreadLocalMap() {
        final PropertiesUtil managerProps = PropertiesUtil.getProperties();
        final boolean inheritable = managerProps.getBooleanProperty(INHERITABLE_MAP);
        if (inheritable) {
            return new InheritableThreadLocal<StringMap>() {
                @Override
                protected StringMap childValue(final StringMap parentValue) {
                    return parentValue != null ? createStringMap(parentValue) : null;
                }
            };
        }
        // if not inheritable, return plain ThreadLocal with null as initial value
        return new ThreadLocal<>();
    }
1231110
@SuppressWarnings("unchecked")
    private static Map<String, String> loadData() {
        final String filePath = "data/cwe.hashmap.serialized";
        try (InputStream input = FileUtils.getResourceAsStream(filePath);
                ObjectInputStream oin = new ObjectInputStream(input)) {
            return (HashMap<String, String>) oin.readObject();
        } catch (ClassNotFoundException ex) {
            LOGGER.warn("Unable to load CWE data. This should not be an issue.");
            LOGGER.debug("", ex);
        } catch (IOException ex) {
            LOGGER.warn("Unable to load CWE data due to an IO Error. This should not be an issue.");
            LOGGER.debug("", ex);
        }
        return null;
    }
24537
@Override
	public HashMap<String, Object> getRequestMap() {
		return (HashMap<String, Object>) JKThreadLocal.getValue(JKContextConstants.HTTP_REQUEST_MAP);
	}