Loads class for the given class name.
164505
static Class<?> loadViewClass(Context context, String name)
            throws ClassNotFoundException {
        return context.getClassLoader().loadClass(name).asSubclass(View.class);
    }
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;
       }

    }
76861
@Nonnull
  public Class <?> loadClass (final String sClassName) throws ClassNotFoundException
  {
    if (m_aBestCandidate != null)
    {
      try
      {
        return m_aBestCandidate.loadClass (sClassName);
      }
      catch (final Throwable t)
      {
        m_aBestCandidate = null;
      }
    }

    Throwable aThrowable = null;
    Class <?> ret = null;
    IClassLoadHelper aLoadHelper = null;

    final Iterator <IClassLoadHelper> iter = m_aLoadHelpers.iterator ();
    while (iter.hasNext ())
    {
      aLoadHelper = iter.next ();
      try
      {
        ret = aLoadHelper.loadClass (sClassName);
        break;
      }
      catch (final Throwable t)
      {
        aThrowable = t;
      }
    }

    if (ret == null)
    {
      if (aThrowable instanceof ClassNotFoundException)
        throw (ClassNotFoundException) aThrowable;
      throw new ClassNotFoundException ("Unable to load class " + sClassName + " by any known loaders.", aThrowable);
    }

    // Remember
    m_aBestCandidate = aLoadHelper;
    return ret;
  }
334172
protected Class<?> classForName(String name) {
        try {
            return resourceLoader.classForName(name);
        } catch (ResourceLoadingException cnfe) {
            return DUMMY_CLASS;
        }
    }
1262752
protected Class loadClass(String className) {
        try {
            return getClass().getClassLoader().loadClass(className);
        } catch (Exception e) {
            //ignore and fallback to TCCL
        }

        try {
            if (Thread.currentThread().getContextClassLoader() != null)
            return Thread.currentThread().getContextClassLoader().loadClass(className);
        } catch (Exception e) {
            //ignore and fallback to TCCL
        }
        throw new IllegalStateException("Failed to load class: ["+className+"].");
    }
294089
public Class<?> loadClassFrom(String name, AbstractClassLoader first) throws ClassNotFoundException {
		// try on the system one
		try { return AppClassLoader.class.getClassLoader().loadClass(name); }
		catch (ClassNotFoundException e) { /* not found. */ }
		Class<?> c = null;
		// check it is not loaded on one of the library
		for (int i = 0; i < libs.size(); i++) {
    		AbstractClassLoader cl = libs.get(i);
    		c = cl.isLoaded(name);
    		if (c != null) return c;
    	}
    	// try with the first one
    	if (first != null) {
    		try {
    			c = first.loadClassInLibrary(name);
    			if (c != null) return c;
    		} catch (FileNotFoundException e) {
    			// not found
    		} catch (IOException e) {
    			throw new ClassNotFoundException(e.getMessage());
    		}
    	}
    	// then, try on other libraries
    	for (int i = 0; i < libs.size(); i++) {
    		AbstractClassLoader cl = libs.get(i);
    		if (cl == first) continue;
    		try {
    			c = cl.loadClassInLibrary(name);
    			if (c != null) return c;
    		} catch (FileNotFoundException e) {
    			// not found
    		} catch (IOException e) {
    			throw new ClassNotFoundException(e.getMessage());
    		}
    	}
		StringBuilder msg = new StringBuilder(512);
		msg.append("Class not found: ").append(name);
		msg.append("\r\nFrom class loader: ").append(first);
		msg.append("\r\nlibraries currently registered:");
		for (int i = 0; i < libs.size(); i++)
			msg.append("\r\n - ").append(libs.get(i).toString());
		throw new ClassNotFoundException(msg.toString());
	}

	/** Load a resource. */
	@SuppressWarnings("resource")
	public IO.Readable getResourceIO(String name, byte priority) {
		if (name.length() == 0) return null;
		if (name.charAt(0) == '/') name = name.substring(1);
		IO.Readable io = null;
    	for (int i = 0; i < libs.size(); i++) {
    		AbstractClassLoader cl = libs.get(i);
   			try { io = cl.open(name, priority); }
   			catch (IOException e) { /* ignore */ }
    		if (io != null) return io;
    	}
       	// then try on the core one
        InputStream in = AppClassLoader.class.getClassLoader().getResourceAsStream(name);
        if (in == null) return null;
        return new IOFromInputStream(in, name, Threading.getUnmanagedTaskManager(), priority);
	}
384404
Class loadAccessClass (String name) {
		// No need to check the parent class loader if the access class hasn't been defined yet.
		if (localClassNames.contains(name)) {
			try {
				return loadClass(name, false);
			} catch (ClassNotFoundException ex) {
				throw new RuntimeException(ex); // Should not happen, since we know the class has been defined.
			}
		}
		return null;
	}
328710
public C load(String className, DynamicInitializer<C> di) throws ClassNotFoundException {

        Class clazz = createClass(className);
        return createObject(className, clazz, di);
    }
1146802
public static function loadClass($className)
  {
    if (!class_exists($className)) {
      $path = self::getPath($className);

      $realPath = stream_resolve_include_path($path);

      if (file_exists($realPath)) {
        require_once($realPath);

        return class_exists($className);
      }
      return false;
    } else {
      return true;
    }
  }
1164840
private final Class loadClass2( String name ) throws ClassNotFoundException {
    Class z = findLoadedClass(name); // Look for pre-existing class
    if( z != null ) return z;
    if( _weaver == null ) _weaver = new Weaver();
    z = _weaver.weaveAndLoad(name, this);    // Try the Happy Class Loader
    if( z != null ) {
      // Occasionally it's useful to print out class names that are actually Weaved.
      // Leave this commented out println here so I can easily find it for next time.
      //   System.out.println("WEAVED: " + name);
      return z;
    }
    z = getParent().loadClass(name); // Try the parent loader.  Probably the System loader.
    if( z != null ) return z;
    return z;
  }
275059
@Override
    public JavaClass loadClass(/*@Nonnull*/ String className) throws ClassNotFoundException {
        if (className == null) {
            throw new IllegalArgumentException("className is null");
        }
        // if (className.indexOf('/') >= 0) throw new IllegalStateException();
        JavaClass javaClass = findClass(className);
        if (javaClass == null) {
            if (DEBUG) {
                System.out.println("Looking up " + className + " on classpath");
                dumpStack();
            }
            javaClass = urlClassPath.lookupClass(className);
            storeClass(javaClass);
        }
        return javaClass;
    }
602085
protected Class<?> classForName(String name) throws ClassNotFoundException {
      try {
        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        if (contextClassLoader != null) {
          return Class.forName(name, false, contextClassLoader);
        }
      } catch (Throwable e) {
        // ignore
      }
      return Class.forName(name, false, getClass().getClassLoader());
    }
339151
@SuppressWarnings("unchecked")
    public static <T> Class<T> loadClass(String className) {
        return loadClass(className, ClassLoaderUtil.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;
    }
114262
@FFDCIgnore(value = { ClassNotFoundException.class })
    public static Class<?> loadClass(ClassLoader cl, String className) {
        if (cl == null)
            return null;

        Class<?> c = null;
        try {
            c = cl.loadClass(className);
        } catch (ClassNotFoundException e) {

        }

        return c;
    }
1352264
def loads(cls, name):
        
        if not isinstance(name, six.string_types):
            raise TypeError(u'arguments to {classname} must be of type {string_types}'.format(
                classname=cls.__name__, string_types=repr(six.string_types)
            ))
        if not name or name.isspace():
            raise ValueError('name must not be empty')

        return cls(name)
765457
@Override public synchronized Class loadClass( String name, boolean resolve ) throws ClassNotFoundException {
    assert !name.equals(Weaver.class.getName());
    Class z = loadClass2(name);      // Do all the work in here
    if( resolve ) resolveClass(z);   // Resolve here instead in the work method
    return z;
  }