if ($(location).filter(".*\\.plugin[/]$").get(0) != null)
return new MultiPluginClasspathLocation(cache, realm, location);
if (location.toString().endsWith(".jar"))
return new JARClasspathLocation(cache, realm, location);
return new FileClasspathLocation(cache, realm, location);
}