code: public Class<?> getClassByNameOrNull(String name) {
  		Map<String, WeakReference<Class<?>>> map;
  
  		synchronized (CACHE_CLASSES) {
  			map = CACHE_CLASSES.get(classLoader);
  			if (map == null) {
  				map = Collections.synchronizedMap(
  						new WeakHashMap<String, WeakReference<Class<?>>>());
  				CACHE_CLASSES.put(classLoader, map);
  			}
  		}
  
  		Class<?> clazz = null;
  		WeakReference<Class<?>> ref = map.get(name);
  		if (ref != null) {
  			clazz = ref.get();
  		}
  
  		if (clazz == null) {
  			try {
  				clazz = Class.forName(name, true, classLoader);
  			} catch (ClassNotFoundException e) {
  				// Leave a marker that the class isn't found
  				map.put(name, new WeakReference<Class<?>>(NEGATIVE_CACHE_SENTINEL));
  				return null;
  			}
  			// two putters can race here, but they'll put the same class
  			map.put(name, new WeakReference<Class<?>>(clazz));
  			return clazz;
  		} else if (clazz == NEGATIVE_CACHE_SENTINEL) {
  			return null; // not found
  		} else {
  			// cache hit
  			return clazz;
  		}
  	}
docs: Load a class by name, returning null rather than throwing an exception
  if it couldn't be loaded. This is to avoid the overhead of creating
  an exception.
  
  @param name the class name
  @return the class object, or null if it could not be found.