public static Class loadClass(String className, ClassLoader classLoader) throws ClassNotFoundException {
        if (className.length() == 1) {
            char type = className.charAt(0);
            if (type == 'B') {
                return Byte.TYPE;
            } else if (type == 'C') {
                return Character.TYPE;
            } else if (type == 'D') {
                return Double.TYPE;
            } else if (type == 'F') {
                return Float.TYPE;
            } else if (type == 'I') {
                return Integer.TYPE;
            } else if (type == 'J') {
                return Long.TYPE;
            } else if (type == 'S') {
                return Short.TYPE;
            } else if (type == 'Z') {
                return Boolean.TYPE;
            } else if (type == 'V') {
                return Void.TYPE;
            } else {
                throw new ClassNotFoundException(className);
            }
        } else if (isPrimitive(className)) {
            return (Class) PRIMITIVE_NAME_TYPE_MAP.get(className);
        } else if (className.charAt(0) == 'L' && className.charAt(className.length() - 1) == ';') {
            return classLoader.loadClass(className.substring(1, className.length() - 1));
        } else {
            try {
                return classLoader.loadClass(className);
            } catch (ClassNotFoundException | NoClassDefFoundError var4) {
                if (className.charAt(0) != '[') {
                    throw var4;
                } else {
                    // CHECKSTYLE.OFF: EmptyStatement
                    int arrayDimension;
                    for (arrayDimension = 0; className.charAt(arrayDimension) == '['; ++arrayDimension) {
                    }
                    // CHECKSTYLE.ON: EmptyStatement

                    Class componentType = loadClass(className.substring(arrayDimension), classLoader);
                    return Array.newInstance(componentType, new int[arrayDimension]).getClass();
                }
            }
        }
    }
@Test
    public void testLoadClass() throws Exception {
        ClassLoader clsLoader = ClassLoader.getSystemClassLoader();
        Class[] classes = new Class[] {
            Integer.class,
            int.class,
            Byte.class,
            byte.class,
            Double.class,
            double.class,
            Float.class,
            float.class,
            Character.class,
            char.class,
            Long.class,
            long.class,
            Short.class,
            short.class,
            Boolean.class,
            boolean.class,
            Void.class,
            Reflections.class,
            Integer[].class,
            int[].class
        };

        for (Class cls : classes) {
            assertEquals(cls, Reflections.loadClass(cls.getName(), clsLoader));
        }
    }