Tries to load the class with the given name. Returns the class object if the class can be loaded. Returns null if
the class could not be loaded.
183743
private Class<?> loadClass(String className) {
        try {
            return EDBUtils.class.getClassLoader().loadClass(className);
        } catch (ClassNotFoundException e) {
            LOGGER.debug("Class {} can not be found by the EDB. This object type is not supported by the EDB."
                + " Maybe the conversion need to be done at model level.", className);
        }
        return null;
    }
745053
protected synchronized Class loadClass(final String name, boolean resolve) throws ClassNotFoundException {
        Class c = this.findLoadedClass(name);
        if (c != null) return c;
        c = (Class) customClasses.get(name);
        if (c != null) return c;

        try {
            c = oldFindClass(name);
        } catch (ClassNotFoundException cnfe) {
            // IGNORE
        }
        if (c == null) c = super.loadClass(name, resolve);

        if (resolve) resolveClass(c);

        return c;
    }
1012402
@SuppressWarnings("unchecked")
    public static boolean findClass(String className) {
        try {
            return getClassLoader().loadClass(className) != null;
        } catch (ClassNotFoundException e) {
            return false;
        } catch (NoClassDefFoundError e) {
            return false;
        }
    }
986551
public Class<?> findClass(String className) throws ClassNotFoundException {
        for (String skip : SKIP_CLASSES) {
            if (skip.equals(className)) {
                return null;
            }
        }

        for (ClassLoader classLoader : getClassLoaders()) {
            try {
                return classLoader.loadClass(className);
            } catch (ClassNotFoundException e) {
                // ignore
            }
        }
        return Class.forName(className);
    }
870481
public Class<?> getClassByEntityName(String name) {
        if (StringUtils.isBlank(name)) {
            throw new IllegalArgumentException("name cannot be null or empty.");
        }
        return entries.get(name);
    }
1347698
protected JClass loadClass(String name)
  {
    try {
      Class cl;

      if (_loader != null)
        cl = Class.forName(name, false, _loader);
      else
        cl = Class.forName(name);

      return new JClassWrapper(cl, this);
    } catch (ClassNotFoundException e) {
      log.log(Level.FINE, e.toString(), e);

      return null;
    }
  }
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) {
			}
		}
	}
251942
static Class<?> loadClass(String className, Class<?> context, boolean checkParent)
    {
        Class<?> clazz = null;
        try
        {
            clazz = Thread.currentThread().getContextClassLoader().loadClass(className);  
        }
        catch(ClassNotFoundException e)
        {
            if(context != null)
            {
                ClassLoader loader = context.getClassLoader();
                while(loader != null)
                {
                    try
                    {                    
                        clazz = loader.loadClass(className);
                        return clazz;
                    }
                    catch(ClassNotFoundException e1)
                    {
                        loader = checkParent ? loader.getParent() : null;
                    }
                }
            }
        }
        return clazz;
    }
715858
public static Class<?> classOrNull(ClassLoader loader, String className)
    {
        try {
            return loader.loadClass(className);
        } catch (ClassNotFoundException ex) {
        } catch (SecurityException ex) {
        } catch (LinkageError ex) {
        } catch (IllegalArgumentException e) {
            // Can be thrown if name has characters that a class name
            // can not contain
        }
        return null;
    }
176342
@Override
  public Class loadClass(String name) throws ClassNotFoundException {

    if (bestCandidate != null) {
      try {
        return bestCandidate.loadClass(name);
      } catch (Throwable t) {
        bestCandidate = null;
      }
    }

    Throwable throwable = null;
    Class clazz = null;
    ClassLoadHelper loadHelper = null;

    Iterator<ClassLoadHelper> iter = loadHelpers.iterator();
    while (iter.hasNext()) {
      loadHelper = iter.next();

      try {
        clazz = loadHelper.loadClass(name);
        break;
      } catch (Throwable t) {
        throwable = t;
      }
    }

    if (clazz == null) {
      if (throwable instanceof ClassNotFoundException) {
        throw (ClassNotFoundException) throwable;
      } else {
        throw new ClassNotFoundException(
            String.format("Unable to load class %s by any known loaders.", name), throwable);
      }
    }

    bestCandidate = loadHelper;

    return clazz;
  }
1341547
private static Class<?> loadClass(String className) {
        try {
            return Class.forName(className, false, getClassLoader());
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
1190964
@SuppressWarnings("unchecked")
    public static <T> Class<T> loadClass(String className) {
        return (Class<T>) loadClass(className, getDefaultClassLoader());
    }
1072175
@SuppressWarnings("rawtypes")
	public static Class loadClass(Class loadClass, String name)
			throws ClassNotFoundException {
		return loadClass(loadClass, name, false);
	}
987215
public static @Nonnull Class<?> _findClass(ClassLoader cl, String name) throws ClassNotFoundException {
        synchronized (getClassLoadingLock(cl, name)) {
            return (Class) invoke(FIND_CLASS, ClassNotFoundException.class, cl, name);
        }
    }
340433
protected JClass loadClass(String name)
  {
    // JDK classes are not loaded, but javax are (e.g. for JSF)
    if (name.startsWith("java.") || name.startsWith("java/")) {
      return getStaticClassLoader().forName(name);
    }

    String classPath = name.replace('.', '/') + ".class";
    URL url = _loader.getResource(classPath);

    if (url != null) {
      JavaClass jClass = new JavaClass(this);
      jClass.setURL(url);

      jClass.setThisClass(name.replace('.', '/'));

      return jClass;
    }

    return null;
  }
464425
public Class< ? > loadClass(final String name,
                                final boolean resolve) throws ClassNotFoundException {
        Class cls = loader.get().load( this,
                                       name,
                                       resolve );
        if ( cls == null ) {
            throw new ClassNotFoundException( "Unable to load class: " + name );
        }

        return cls;
    }
45879
public static Class<?> tryLoad(String className) {
        try {
            return Class.forName(className, false, JSFContainer.class.getClassLoader());
        } catch (ClassNotFoundException notFound) {
            return null;
        }
    }