class DefaultRepoInitFactory {

    static <T> @Nullable Class<? extends T> loadClazz(final @NotNull ClassLoader classLoader,
                                                      final @NotNull Class<T> iface,
                                                      final @NotNull String clazzName) {
        try {
            Class<?> clazz = classLoader.loadClass(clazzName);
            if (iface.isAssignableFrom(clazz)) {
                return clazz.asSubclass(iface);
            } else {
                Throwable e = new IllegalStateException();
                LOGGER.warn(MessageFormat.format(
                        "class from classLoader argument does not implement {0} from oakpal classLoader: {1}",
                        iface.getSimpleName(), clazzName), e);
            }
        } catch (Exception e) {
            LOGGER.warn(MessageFormat.format(
                    "Failed to load the class from the provided classLoader: {0}", clazzName), e);
        }
        return null;
    }

      DefaultRepoInitFactory(final @Nullable Class<? extends RepoInitParser> parserClazz);

}