Return the class with the given name.
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;
  }
334172
protected Class<?> classForName(String name) {
        try {
            return resourceLoader.classForName(name);
        } catch (ResourceLoadingException cnfe) {
            return DUMMY_CLASS;
        }
    }
219598
public function getClass($name)
    {
        if ($this->hasClasses()) {
            foreach ($this->getClasses() as $class) {
                if ($class->getName() === $name) {
                    return $class;
                }
            }
        }
        return null;
    }
824795
def get_class(self, module, class_name):
        """"""
        # let's get the class
        class_object = getattr(module, class_name, None)
        if not class_object or not issubclass(class_object, Controller):
            class_object = None

        return class_object
1021123
def name(self):
        """"""
        if self._name is None:
            return re.sub(r"(?<=\w)([A-Z])", r" \1", self.__class__.__name__)
        else:
            return self._name
1346343
def require(self, name):
        """"""
        value = self.get(name)
        if value is None:
            raise TypeError(
                "{0} requires the parameter '{1}'.".format(
                    self.__class__, name
                )
            )
        return value
406245
def getCollectionClass(cls, name) :
        """'"""
        try :
            return cls.collectionClasses[name]
        except KeyError :
            raise KeyError( "There is no Collection Class of type: '%s'; currently supported values: [%s]" % (name, ', '.join(getCollectionClasses().keys())) )
613743
def _get_subclass(name):
        
        return next(x for x in BaseContainer.__subclasses__() if x.__name__ == name)
671192
public static Class<?> getClass(String classname) {
		Class<?> clazz = null;
		try {
			clazz = Class.forName(classname);

		} catch (Exception e) {
			// Try the second approach
		}
		if (null == clazz) {
			Exception classNotFoundEx = null;
			try {
				clazz = Class.forName(classname, true, new ClassLoaderResourceUtils().getClass().getClassLoader());
			} catch (Exception e) {
				// Try the third approach
				classNotFoundEx = e;
			}
			if (null == clazz) {
				ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader();
				if (null != threadClassLoader) {
					try {
						clazz = Class.forName(classname, true, threadClassLoader);
					} catch (Exception e) {
						throw new BundlingProcessException(e.getMessage() + " [The custom class " + classname
								+ " could not be instantiated, check wether it is available on the classpath and"
								+ " verify that it has a zero-arg constructor].\n" + " The specific error message is: "
								+ e.getClass().getName() + ":" + e.getMessage(), e);
					}
				} else {
					throw new BundlingProcessException(classNotFoundEx.getMessage() + " [The custom class " + classname
							+ " could not be instantiated, check wether it is available on the classpath and"
							+ " verify that it has a zero-arg constructor].\n" + " The specific error message is: "
							+ classNotFoundEx.getClass().getName() + ":" + classNotFoundEx.getMessage(),
							classNotFoundEx);
				}

			}
		}
		return clazz;
	}
540821
def get(self, name=None):
        
        if name is None:
            return self._classes
        else:
            if name not in self._classes.keys():
                return None
            else:
                return self._classes[name]
869500
public Class<?> getClassByName(String name) throws ClassNotFoundException {
    return Class.forName(name, true, classLoader);
  }
37072
@SuppressWarnings("unchecked")
    private static <T> Class<T> getClass(String className)
    {
        if (CLASS_CACHE.containsKey(className))
        {
            return (Class<T>) CLASS_CACHE.get(className);
        }
        try
        {
            final Class<?> clazz = LOADER.loadClass(className);
            CLASS_CACHE.put(className, clazz);
            return (Class<T>) clazz;
        }
        catch (final ClassNotFoundException exception)
        {
            throw new LionEngineException(exception, ERROR_CLASS_PRESENCE + className);
        }
    }
969338
def get(self, name, strict=True):
        """"""
        if not isinstance(name, str) or name.startswith('_'):
            raise AttributeError(self.__class__.__name__, name)
        elif strict and name not in self._possible_attributes:
            raise AttributeError('%s is not a valid attribute of %r.' %
                                 (name, self))
        elif name in self._attributes:
            return self._attributes[name]
        else:
            raise exceptions.AttributeNotProvided(name)
343424
public static Class getClassByName(String clsName,ClassLoader loader)
	{
		try
		{
			return Class.forName(clsName,true,loader);
		}

		catch (ClassNotFoundException e)
		{
			throw new RuntimeException(e);
		}
	}
102980
def get_class(name) #:nodoc:
      raise ArgumentError, "class name is blank" if blank?(name)

      response = call_server(:method => :get, :uri => "class/#{@database}/#{name}")
      rslt = process_response(response) do
        raise NotFoundError, 'class not found' if response.body =~ /Invalid class/
      end

      classes = [rslt]
      decorate_classes_with_model(classes)
      clazz = classes[0]
      clazz.extend Orientdb4r::HashExtension
      clazz.extend Orientdb4r::OClass
      unless clazz['properties'].nil? # there can be a class without properties
        clazz.properties.each do |prop|
          prop.extend Orientdb4r::HashExtension
          prop.extend Orientdb4r::Property
        end
      end

      clazz
    end
539407
def find(cls, name):
        ''''''
        if not cls.mapping:  # pragma: no branch
            for _, obj in inspect.getmembers(exceptions):
                if inspect.isclass(obj):
                    if issubclass(obj, exceptions.NSQException):  # pragma: no branch
                        if hasattr(obj, 'name'):
                            cls.mapping[obj.name] = obj
        klass = cls.mapping.get(name)
        if klass == None:
            raise TypeError('No matching exception for %s' % name)
        return klass
617902
def classname(ob):
    """"""
    import inspect
    if inspect.isclass(ob):
        return '.'.join([ob.__module__, ob.__name__])
    else:
        return '.'.join([ob.__class__.__module__, ob.__class__.__name__])