for (UrlType type : urlTypes) {
if (type.matches(url)) {
try {
return type.createDir(url);
} catch (Exception e) {
throw new ReflectionsException("could not create Dir using " + type.getClass().getName() +" from url " + url.toExternalForm());
}
}
}
throw new ReflectionsException("could not create Vfs.Dir from url, no matching UrlType was found [" + url.toExternalForm() + "]\n" +
"either use fromURL(final URL url, final List<UrlType> urlTypes) or " +
"use the static setDefaultURLTypes(final List<UrlType> urlTypes) or addDefaultURLTypes(UrlType urlType) " +
"with your specialized UrlType.");
}