public Dir createDir(URL url) throws Exception { return new UrlTypeVFS().createDir(url); } },
public Dir createDir(final URL url) { try { URL adaptedUrl = adaptURL(url); return new ZipDir(new JarFile(adaptedUrl.getFile())); } catch (Exception e) { try { return new ZipDir(new JarFile(url.getFile())); } catch (IOException e1) { if (Reflections.log != null) { Reflections.log.warn("Could not get URL", e); Reflections.log.warn("Could not get URL", e1); } } } return null; }
URL replaceZipSeparators(String path, Predicate<File> acceptFile) throws MalformedURLException { int pos = 0; while (pos != -1) { pos = findFirstMatchOfDeployableExtention(path, pos); if (pos > 0) { File file = new File(path.substring(0, pos - 1)); if (acceptFile.apply(file)) { return replaceZipSeparatorStartingFrom(path, pos); } } } throw new ReflectionsException("Unable to identify the real zip file in path '" + path + "'."); }
public URL adaptURL(URL url) throws MalformedURLException { if (VFSZIP.equals(url.getProtocol())) { return replaceZipSeparators(url.getPath(), realFile); } else if (VFSFILE.equals(url.getProtocol())) { return new URL(url.toString().replace(VFSFILE, "file")); } else { return url; } }
public URL adaptURL(URL url) throws MalformedURLException { if (VFSZIP.equals(url.getProtocol())) { return replaceZipSeparators(url.getPath(), realFile); } else if (VFSFILE.equals(url.getProtocol())) { return new URL(url.toString().replace(VFSFILE, "file")); } else { return url; } }
URL replaceZipSeparators(String path, Predicate<File> acceptFile) throws MalformedURLException { int pos = 0; while (pos != -1) { pos = findFirstMatchOfDeployableExtention(path, pos); if (pos > 0) { File file = new File(path.substring(0, pos - 1)); if (acceptFile.apply(file)) { return replaceZipSeparatorStartingFrom(path, pos); } } } throw new ReflectionsException("Unable to identify the real zip file in path '" + path + "'."); }
public Dir createDir(URL url) throws Exception { return new UrlTypeVFS().createDir(url); } },
public URL adaptURL(URL url) throws MalformedURLException { if (VFSZIP.equals(url.getProtocol())) { return replaceZipSeparators(url.getPath() , realFile); } else if (VFSFILE.equals(url.getProtocol())) { return new URL(url.toString().replace(VFSFILE , "file")); } else { return url; } }
public Dir createDir(final URL url) { try { URL adaptedUrl = adaptURL(url); return new ZipDir(new JarFile(adaptedUrl.getFile())); } catch (Exception e) { try { return new ZipDir(new JarFile(url.getFile())); } catch (IOException e1) { if (Reflections.log != null) { Reflections.log.warn("Could not get URL", e); Reflections.log.warn("Could not get URL", e1); } } } return null; }
URL replaceZipSeparators(String path, Predicate<File> acceptFile) throws MalformedURLException { int pos = 0; while (pos != -1) { pos = findFirstMatchOfDeployableExtention(path, pos); if (pos > 0) { File file = new File(path.substring(0, pos - 1)); if (acceptFile.apply(file)) { return replaceZipSeparatorStartingFrom(path, pos); } } } throw new ReflectionsException("Unable to identify the real zip file in path '" + path + "'."); }
public Dir createDir(URL url) throws Exception { return new UrlTypeVFS().createDir(url); } },
public URL adaptURL(URL url) throws MalformedURLException { if (VFSZIP.equals(url.getProtocol())) { return replaceZipSeparators(url.getPath(), realFile); } else if (VFSFILE.equals(url.getProtocol())) { return new URL(url.toString().replace(VFSFILE, "file")); } else { return url; } }
public Dir createDir(final URL url) { try { URL adaptedUrl = adaptURL(url); return new ZipDir(new JarFile(adaptedUrl.getFile())); } catch (Exception e) { try { return new ZipDir(new JarFile(url.getFile())); } catch (IOException e1) { if (Reflections.log != null) { Reflections.log.warn("Could not get URL", e); Reflections.log.warn("Could not get URL", e1); } } } return null; }
URL replaceZipSeparators(String path, Predicate<File> acceptFile) throws MalformedURLException { int pos = 0; while (pos != -1) { pos = findFirstMatchOfDeployableExtention(path, pos); if (pos > 0) { File file = new File(path.substring(0, pos - 1)); if (acceptFile.apply(file)) { return replaceZipSeparatorStartingFrom(path, pos); } } } throw new ReflectionsException("Unable to identify the real zip file in path '" + path + "'."); }
public Dir createDir(URL url) throws Exception { return new UrlTypeVFS().createDir(url); } },
public URL adaptURL(URL url) throws MalformedURLException { if (VFSZIP.equals(url.getProtocol())) { return replaceZipSeparators(url.getPath(), realFile); } else if (VFSFILE.equals(url.getProtocol())) { return new URL(url.toString().replace(VFSFILE, "file")); } else { return url; } }
public Dir createDir(final URL url) { try { URL adaptedUrl = adaptURL(url); return new ZipDir(new JarFile(adaptedUrl.getFile())); } catch (Exception e) { if (Reflections.log != null) { Reflections.log.warn("Could not get URL", e); } try { return new ZipDir(new JarFile(url.getFile())); } catch (IOException e1) { if (Reflections.log != null) { Reflections.log.warn("Could not get URL", e1); } } } return null; }
URL replaceZipSeparators(String path , Predicate<File> acceptFile) throws MalformedURLException { int pos = 0; while (pos != - 1) { pos = findFirstMatchOfDeployableExtention(path , pos); if (pos > 0) { File file = new File(path.substring(0 , pos - 1)); if (acceptFile.apply(file)) { return replaceZipSeparatorStartingFrom(path , pos); } } } throw new ReflectionsException("Unable to identify the real zip file in path '" + path + "'."); }
public Dir createDir(URL url) throws Exception { return new UrlTypeVFS().createDir(url); } },
public Dir createDir(final URL url) { try { URL adaptedUrl = adaptURL(url); return new ZipDir(new JarFile(adaptedUrl.getFile())); } catch (Exception e) { try { return new ZipDir(new JarFile(url.getFile())); } catch (IOException e1) { final LoggingService log = Logger.getLogger(Reflections.class); if (log != null) { log.warning("Could not get URL" , e); log.warning("Could not get URL" , e1); } } } return null; }