ClassLoader classLoader = getClassLoader();
if (classLoader == null)
throw new IllegalStateException("ClassLoader has not been constructed for " + getContextName());
Collection<String> included = toCollection(mclmd.getIncludedClasses());
ClassFilter includedFilter = getIncluded();
Collection<String> excluded = toCollection(mclmd.getExcludedClasses());
ClassFilter excludedFilter = getExcluded();
for (String path : paths)
{
if (included.isEmpty() == false && included.contains(path) == false)
continue;
if (includedFilter != null && includedFilter.matchesResourcePath(path) == false)
continue;
if (excluded.isEmpty() == false && excluded.contains(path))
continue;
if (excludedFilter != null && excludedFilter.matchesResourcePath(path))
continue;
ResourceContext context = new ResourceContext(getURL(path), path, classLoader);
if (filter == null || filter.accepts(context))
visitor.visit(context);