### Question:
ClassUtil { public static Class<?> getClass(final String name, final int arrayDepth) throws ClassNotFoundException { if (arrayDepth == 0) { return getClass(name); } char alias = getAliasOfBaseType(name); final char[] chars; if (alias == '\0') { chars = new char[name.length() + 2 + arrayDepth]; Arrays.fill(chars, 0, arrayDepth, '['); chars[arrayDepth] = 'L'; name.getChars(0, name.length(), chars, arrayDepth + 1); chars[chars.length - 1] = ';'; } else { chars = new char[arrayDepth + 1]; Arrays.fill(chars, 0, arrayDepth, '['); chars[arrayDepth] = alias; } return getClassByInternalName(new String(chars)); }  static String getClassName(Object object); static Map<String, Field> getSettableMemberFields(final Class<?> type); static Method[] getPublicMemberMethods(Class<?> type, String name); static Method[] getPublicMethods(Class<?> type, String name); static ClassLoader getDefaultClassLoader(); static Class<?> getBoxedPrimitiveClass(Class<?> type); static char getAliasOfBaseType(final String name); static Class<?> getClass(final String name, final int arrayDepth); static Class<?> getPrimitiveClass(final String name); static Class<?> getClass(final String name); static boolean isStatic(Member member); static boolean isFinal(Member member); @SuppressWarnings({ "BooleanMethodIsAlwaysInverted" }) static boolean isPublic(Class<?> cls); @SuppressWarnings({ "BooleanMethodIsAlwaysInverted" }) static boolean isPublic(Member member); @Deprecated static boolean isProtected(Member member); static boolean isVoidType(Class<?> cls); static void setAccessible(T[] accessibles); static void setAccessible(AccessibleObject accessible); static Object newInstance(final String type); static Object newInstance(final Class<?> type);  }### Answer:
@Test void getClassByNameTest() throws ClassNotFoundException { assertSame(int.class, ClassUtil.getClass("int", 0)); assertSame(int[].class, ClassUtil.getClass("int", 1)); assertSame(int[][].class, ClassUtil.getClass("int", 2)); assertSame(Map.class, ClassUtil.getClass("java.util.Map", 0)); assertSame(Map[].class, ClassUtil.getClass("java.util.Map", 1)); assertSame(Map[][].class, ClassUtil.getClass("java.util.Map", 2)); }