/** * Returns a set of external configuration resource locations which are used by the filters set. * @return a set of external configuration resource locations which are used by the filters set. */ private Set<String> getExternalResourceLocationsOfFilters() { final Set<String> externalConfigurationResources = new HashSet<>(); filters.stream().filter(filter -> filter instanceof ExternalResourceHolder) .forEach(filter -> { final Set<String> checkExternalResources = ((ExternalResourceHolder) filter).getExternalResourceLocations(); externalConfigurationResources.addAll(checkExternalResources); }); return externalConfigurationResources; }
/** * Returns a set of external configuration resource locations which are used by the checks set. * @param checks a set of checks. * @return a set of external configuration resource locations which are used by the checks set. */ private static Set<String> getExternalResourceLocationsOfChecks(Set<AbstractCheck> checks) { final Set<String> externalConfigurationResources = new HashSet<>(); checks.stream().filter(check -> check instanceof ExternalResourceHolder).forEach(check -> { final Set<String> checkExternalResources = ((ExternalResourceHolder) check).getExternalResourceLocations(); externalConfigurationResources.addAll(checkExternalResources); }); return externalConfigurationResources; }
/** * Returns a set of external configuration resource locations which are used by all file set * checks and filters. * @return a set of external configuration resource locations which are used by all file set * checks and filters. */ private Set<String> getExternalResourceLocations() { final Set<String> externalResources = new HashSet<>(); fileSetChecks.stream().filter(check -> check instanceof ExternalResourceHolder) .forEach(check -> { final Set<String> locations = ((ExternalResourceHolder) check).getExternalResourceLocations(); externalResources.addAll(locations); }); filters.getFilters().stream().filter(filter -> filter instanceof ExternalResourceHolder) .forEach(filter -> { final Set<String> locations = ((ExternalResourceHolder) filter).getExternalResourceLocations(); externalResources.addAll(locations); }); return externalResources; }
@Override public Set<String> getExternalResourceLocations() { Set<String> locations = new LinkedHashSet<>(); for (FileSetCheck check : this.checks) { if (check instanceof ExternalResourceHolder) { locations.addAll( ((ExternalResourceHolder) check).getExternalResourceLocations()); } } return locations; }
/** * Returns a set of external configuration resource locations which are used by the checks set. * @param checks a set of checks. * @return a set of external configuration resource locations which are used by the checks set. */ private static Set<String> getExternalResourceLocationsOfChecks(Set<AbstractCheck> checks) { final Set<String> externalConfigurationResources = new HashSet<>(); checks.stream().filter(check -> check instanceof ExternalResourceHolder).forEach(check -> { final Set<String> checkExternalResources = ((ExternalResourceHolder) check).getExternalResourceLocations(); externalConfigurationResources.addAll(checkExternalResources); }); return externalConfigurationResources; }
/** * Returns a set of external configuration resource locations which are used by the filters set. * @return a set of external configuration resource locations which are used by the filters set. */ private Set<String> getExternalResourceLocationsOfFilters() { final Set<String> externalConfigurationResources = new HashSet<>(); filters.stream().filter(filter -> filter instanceof ExternalResourceHolder) .forEach(filter -> { final Set<String> checkExternalResources = ((ExternalResourceHolder) filter).getExternalResourceLocations(); externalConfigurationResources.addAll(checkExternalResources); }); return externalConfigurationResources; }
/** * Returns a set of external configuration resource locations which are used by all file set * checks and filters. * @return a set of external configuration resource locations which are used by all file set * checks and filters. */ private Set<String> getExternalResourceLocations() { final Set<String> externalResources = new HashSet<>(); fileSetChecks.stream().filter(check -> check instanceof ExternalResourceHolder) .forEach(check -> { final Set<String> locations = ((ExternalResourceHolder) check).getExternalResourceLocations(); externalResources.addAll(locations); }); filters.getFilters().stream().filter(filter -> filter instanceof ExternalResourceHolder) .forEach(filter -> { final Set<String> locations = ((ExternalResourceHolder) filter).getExternalResourceLocations(); externalResources.addAll(locations); }); return externalResources; }