code: public static Class javaTypeToClass(String type)
          throws ClassNotFoundException
      {
          if (type == null)
          {
              throw new NullPointerException("type");
          }
  
          // try common types and arrays of common types first
          Class clazz = (Class) COMMON_TYPES.get(type);
          if (clazz != null)
          {
              return clazz;
          }
  
          int len = type.length();
          if (len > 2 && type.charAt(len - 1) == ']' && type.charAt(len - 2) == '[')
          {
              String componentType = type.substring(0, len - 2);
              Class componentTypeClass = classForName(componentType);
              return Array.newInstance(componentTypeClass, 0).getClass();
          }
  
          return classForName(type);
          
      }
docs: Similar as {@link #classForName(String)}, but also supports primitive types
  and arrays as specified for the JavaType element in the JavaServer Faces Config DTD.
  
  @param type fully qualified class name or name of a primitive type, both optionally
  followed by "[]" to indicate an array type
  @return the corresponding Class
  @throws NullPointerException if type is null
  @throws ClassNotFoundException