public static String[] getPageNames(Class<? extends BasePage> pageClass) {
        int numPages = 0;
        for (Class<?> clz : pageTypes) {
            if (pageClass.isAssignableFrom(clz)) {
                numPages++;
            }
        }
        String[] res = new String[numPages];
        int i = 0;
        for (Class<?> clz : pageTypes) {
            if (pageClass.isAssignableFrom(clz)) {
                res[i++] = clz.getName();
            }
        }
        return res;
    }