Retrieves the class object for the given qualified class name.

@param className  The qualified name of the class
@param initialize Whether the class shall be initialized
@return The class object
970628
public static Class getClass(String className, boolean initialize) throws ClassNotFoundException
    {
        return Class.forName(className, initialize, getClassLoader());
    }
785672
private synchronized Class<?> getClass(String className) throws Exception {
        // see if we need to invalidate the class
        ClassInformation classInfo = classInformation.get(className);
        File classFile = new File(classInfo.pluginPath);
        if (classFile.lastModified() > classInfo.lastModified) {
            logger.info("Class {} has been modified, reloading", className);
            logger.info("Thread ID: {}", Thread.currentThread().getId());
            classInfo.loaded = false;
            classInformation.put(className, classInfo);

            // also cleanup anything in methodInformation with this className so it gets reloaded
            Iterator<Map.Entry<String, com.groupon.odo.proxylib.models.Method>> iter = methodInformation.entrySet().iterator();
            while (iter.hasNext()) {
                Map.Entry<String, com.groupon.odo.proxylib.models.Method> entry = iter.next();
                if (entry.getKey().startsWith(className)) {
                    iter.remove();
                }
            }
        }

        if (!classInfo.loaded) {
            loadClass(className);
        }

        return classInfo.loadedClass;
    }
3948
public static Class<?> classForNameOrNull(final String className) {
        try {
            return Class.forName(className);
        } catch (final ReflectiveOperationException | LinkageError e) {
            return null;
        }
    }
1272803
public JavaClassModel getByName(String qualifiedName) throws NonUniqueResultException
    {
        ExecutionStatistics.get().begin("getUniqueByName(qualifiedName)");
        JavaClassModel result = resolveByQualifiedName(qualifiedName);
        ExecutionStatistics.get().end("getUniqueByName(qualifiedName)");
        return result;
    }
1305550
private static ImmutableList<String> getClassNames(String qualifiedName) {
    ImmutableList.Builder<String> classNames = ImmutableList.builder();
    List<String> parts = DOT_SPLITTER.splitToList(qualifiedName);
    for (int i = 0; i < parts.size(); i++) {
      String part = parts.get(i);
      if (isClassOrConstantName(part)) {
        classNames.add(DOT_JOINER.join(parts.subList(0, i + 1)));
      }
    }
    return classNames.build();
  }
371234
@SuppressWarnings("unchecked")
    public static <T> T getObjectInstance(String className) {
        try {
            Class clazz = Class.forName(className);
            return (T) clazz.newInstance();
        } catch (Exception e) {
            throw new Error(e);
        }
    }
818178
@SuppressWarnings("unchecked")
	public static <T> Class<T> loadClass(String className, boolean isInitialized) {
		return (Class<T>) ClassLoaderUtil.loadClass(className, isInitialized);
	}
551409
@SuppressWarnings("unchecked")
    public static <T> Class<T> classForName(String className) {
        try {
            return (Class<T>)Class.forName(className);
        }
        catch (ClassNotFoundException | VerifyError e) {
            // Catching VerifyError fixes issue #147. I don't know how to unit test it.
            return null;
        }
    }
339151
@SuppressWarnings("unchecked")
    public static <T> Class<T> loadClass(String className) {
        return loadClass(className, ClassLoaderUtil.class.getClassLoader());
    }
416282
public Class loadClass(String name)
    {
        try
        {
            return classLoader.loadClass( name );
        }
        catch (ClassNotFoundException notFound)
        {
            return null;
        }
        catch (NoClassDefFoundError notFound)
        {
            return null;
        }
    }
668226
protected ClassEntry getClassEntry(String name, String pathName)
    throws ClassNotFoundException
  {
    // Find the path corresponding to the class
    Path path = getPath(pathName);

    if (path != null && path.length() > 0) {
      return new ClassEntry(_loader, name, path, path,
                            getCodeSource(path));
    }
    else
      return null;
  }
1034478
public static Class<?> checkClassExist(String className) {
		Class<?> result = classExistCache.get(className);
		if (result != null) {
			if (ClassOrMethodNotExist.class.equals(result))
				return null;
			else
				return result;
		}
		try {
			result = Class.forName(className);
			if (result != null)
				classExistCache.put(className, result);
			else
				classExistCache.put(className, ClassOrMethodNotExist.class);
			return result;
		} catch (Exception e) {
			DialectException.eatException(e);
			classExistCache.put(className, ClassOrMethodNotExist.class);
			return null;
		}
	}
968577
public static Class<?> findClass(String className) {
        try {
            return forName(className, getDefaultClassLoader());
        } catch (ClassNotFoundException e) {
            return null;
        }
    }
1098234
public C createObject(String className, Class clazz) throws ClassNotFoundException {
        return createObject(className, clazz, /* no dynamic init */ null);
    }
567987
private ClassData fetchBytecodeFromRemote(String className) {
        ClusterService cluster = nodeEngine.getClusterService();
        ClassData classData;
        boolean interrupted = false;
        for (Member member : cluster.getMembers()) {
            if (isCandidateMember(member)) {
                continue;
            }
            try {
                classData = tryToFetchClassDataFromMember(className, member);
                if (classData != null) {
                    if (logger.isFineEnabled()) {
                        logger.finest("Loaded class " + className + " from " + member);
                    }
                    return classData;
                }
            } catch (InterruptedException e) {
                // question: should we give-up on loading at this point and simply throw ClassNotFoundException?
                interrupted = true;
            } catch (Exception e) {
                if (logger.isFinestEnabled()) {
                    logger.finest("Unable to get class data for class " + className
                            + " from member " + member, e);
                }
            }
        }
        if (interrupted) {
            Thread.currentThread().interrupt();
        }
        return null;
    }
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;
    }
267331
@Override
    public Object getMember(String name) {
        switch (name) {
            case "toJSON":
                return F_toJSON;
            case "toString":
                return F_toString;
            case "valueOf":
                return F_valueOf;
            case "getJavaObject":
                return F_getJavaObject;
        }
        return null;
//        throw new RuntimeException(getClassName() + "." + name + " is not defined");
    }