public boolean accept(final String path) { final int len = filters.length; for (int i = 0; i < len; i++) { if (filters[i].accept(path)) return includeFlag[i]; } return defaultVal; }
public boolean equals(final InvertingPathFilter obj) { return obj != null && obj.delegate.equals(delegate); }
public int hashCode() { return 47 + delegate.hashCode(); }
/** {@inheritDoc} */ public boolean accept(final String path) { return ! delegate.accept(path); }
public boolean equals(final InvertingPathFilter obj) { return obj != null && obj.delegate.equals(delegate); }
public int hashCode() { return 47 + delegate.hashCode(); }
public boolean accept(final String path) { final int len = filters.length; for (int i = 0; i < len; i++) { if (filters[i].accept(path)) return includeFlag[i]; } return defaultVal; }
private static void print(PrintWriter out, String prefix, DependencySpec spec, FastCopyHashSet<String> visited, final boolean last, final File... roots) { if (spec instanceof ModuleDependencySpec) { final ModuleDependencySpec moduleDependencySpec = (ModuleDependencySpec) spec; final String name = moduleDependencySpec.getName(); out.print(prefix); out.print(last ? '└' : '├'); out.print('─'); out.print(' '); out.print(name); if (moduleDependencySpec.isOptional()) { out.print(" (optional)"); } final PathFilter exportFilter = moduleDependencySpec.getExportFilter(); if (! exportFilter.equals(PathFilters.rejectAll())) { out.print(" (exported)"); } if (visited.add(name)) { print(out, prefix + (last ? " " : "│ "), name, visited, roots); } else { out.println(); } } }
/** {@inheritDoc} */ @Override public boolean accept(String path) { for (PathFilter filter : delegates) { if (filter.accept(path) == any) { return any; } } return ! any; }
private static void print(PrintWriter out, String prefix, DependencySpec spec, FastCopyHashSet<ModuleIdentifier> visited, final boolean last, final File... roots) { if (spec instanceof ModuleDependencySpec) { final ModuleDependencySpec moduleDependencySpec = (ModuleDependencySpec) spec; final ModuleIdentifier identifier = moduleDependencySpec.getIdentifier(); out.print(prefix); out.print(last ? '└' : '├'); out.print('─'); out.print(' '); out.print(identifier); if (moduleDependencySpec.isOptional()) { out.print(" (optional)"); } final PathFilter exportFilter = moduleDependencySpec.getExportFilter(); if (! exportFilter.equals(PathFilters.rejectAll())) { out.print(" (exported)"); } if (visited.add(identifier)) { print(out, prefix + (last ? " " : "│ "), identifier, visited, roots); } else { out.println(); } } }
/** {@inheritDoc} */ @Override public boolean accept(String path) { for (PathFilter filter : delegates) { if (filter.accept(path) == any) { return any; } } return ! any; }
/** {@inheritDoc} */ public boolean accept(final String path) { return ! delegate.accept(path); }
/** * Filter the paths from {@code source} into {@code target} using {@code filter}. * * @param source the source paths * @param filter the filter to apply * @param target the destination for filtered paths * @param <T> the collection type * @return the {@code target} set */ public static <T extends Collection<? super String>> T filterPaths(Iterable<String> source, PathFilter filter, T target) { for (String path : source) { if (filter.accept(path)) { target.add(path); } } return target; }
public boolean accept(final String className) { return resourcePathFilter.accept(className.replace('.', '/').concat(".class")); } }
/** * Filter the paths from {@code source} into {@code target} using {@code filter}. * * @param source the source paths * @param filter the filter to apply * @param target the destination for filtered paths * @param <T> the collection type * @return the {@code target} set */ public static <T extends Collection<? super String>> T filterPaths(Iterable<String> source, PathFilter filter, T target) { for (String path : source) { if (filter.accept(path)) { target.add(path); } } return target; }
public boolean accept(final String className) { return resourcePathFilter.accept(className.replace('.', '/').concat(".class")); } }
public boolean hasNext() { Resource next; while (this.next == null && original.hasNext()) { next = original.next(); if (filter.accept(next.getName())) { this.next = next; } } return this.next != null; }
public List<Resource> loadResourceLocal(final String name) { return resourcePathFilter.accept(name) ? originalLoader.loadResourceLocal(name) : Collections.<Resource>emptyList(); } }
public boolean hasNext() { Resource next; while (this.next == null && original.hasNext()) { next = original.next(); if (filter.accept(next.getName())) { this.next = next; } } return this.next != null; }
public List<Resource> loadResourceLocal(final String name) { return resourcePathFilter.accept(name) ? originalLoader.loadResourceLocal(name) : Collections.<Resource>emptyList(); } }