public boolean accepts(ResourceContext resource) { return resource.getUrl().toString().contains("weld.deployer") == false; } }
public boolean accepts(ResourceContext resource) { URL url = resource.getUrl(); String urlString = url.toExternalForm(); List<PathMetaData> paths = smd.getPaths(); if (paths != null && paths.isEmpty() == false) { for (PathMetaData pmd : paths) { String name = pmd.getPathName(); // url contains path if (urlString.contains(name)) { return true; } } } return false; } }
public boolean accepts(ResourceContext resource) { try { URL url = resource.getUrl(); VirtualFile file = VFS.getChild(url.toURI()); VirtualFile[] parents = file.getParentFiles(); // we're going from the end, from API the first element is the leafmost. for (VirtualFile parent : parents) { // is our resource part of weld's classpath if (cpFiles.contains(parent)) return true; } return false; } catch (Exception e) { throw new RuntimeException(e); } } };
return false; URL url = resource.getUrl(); String urlString = url.toExternalForm(); for (Map.Entry<String, RootNode> root : roots.entrySet())
public boolean accepts(ResourceContext rc) { try { VirtualFile file = VFS.getChild(rc.getUrl()); while (file != null) { if (url.equals(file.toURL())) // our parent is the lib return false; file = file.getParent(); } return true; } catch (Exception e) { return false; } } }
return false; URL url = resource.getUrl(); String urlString = url.toExternalForm(); List<PathMetaData> paths = smd.getPaths();
return false; URL url = resource.getUrl(); String urlString = url.toExternalForm(); List<PathMetaData> paths = smd.getPaths();