code: public static Class<?> classForName(final String name, final ClassLoader loader)
        throws ClassNotFoundException {
      if (name.startsWith("[")) {
        throw new UnsupportedOperationException("No support for arrays, etc.  Name was: " + name);
      } else if (name.equals("boolean")) {
        return boolean.class;
      } else if (name.equals("byte")) {
        return byte.class;
      } else if (name.equals("char")) {
        return char.class;
      } else if (name.equals("short")) {
        return short.class;
      } else if (name.equals("int")) {
        return int.class;
      } else if (name.equals("long")) {
        return long.class;
      } else if (name.equals("float")) {
        return float.class;
      } else if (name.equals("double")) {
        return double.class;
      } else if (name.equals("void")) {
        return void.class;
      } else {
        return loader.loadClass(name);
      }
    }
docs: Lookup the provided name using the provided classloader. This method
  includes special handling for primitive types, which can be looked up
  by short name (all other types need to be looked up by long name).
  
  @throws ClassNotFoundException