public static void _loadFromClasspath(FileUtils base, List<URL> jarList, ClassLoader classLoader) {
PerformanceTimer timer = new PerformanceTimer();
timer.event("create filters");
Options options = SystemInstance.get().getOptions();
String include = "";
String exclude = "";
PatternFilter classpathInclude = new PatternFilter(options.get(DeploymentFilterable.CLASSPATH_INCLUDE, ".*"));
PatternFilter classpathExclude = new PatternFilter(options.get(DeploymentFilterable.CLASSPATH_EXCLUDE, ""));
IncludeExcludeFilter classpathFilter = new IncludeExcludeFilter(classpathInclude, classpathExclude);
PatternFilter packageInclude = new PatternFilter(options.get(DeploymentFilterable.PACKAGE_INCLUDE, ".*"));
PatternFilter packageExclude = new PatternFilter(options.get(DeploymentFilterable.PACKAGE_EXCLUDE, ""));
IncludeExcludeFilter packageFilter;
if (classpathInclude.getPattern().pattern().equals(".*") && packageInclude.getPattern().pattern().equals(".*")) {
timer.event("callers");
Set<String> callers = callers();
timer.event("parse packages");
callers.size();
Set<String> packages = new HashSet<String>();
for (String caller : callers) {
String[] parts = caller.split("\\.");
if (parts.length > 2) {
parts = new String[]{parts[0], parts[1]};
}
packages.add(Join.join(".", parts));
}
Filter includes = Filters.packages(packages.toArray(new String[0]));
packageFilter = new IncludeExcludeFilter(includes, packageExclude);
} else {
packageFilter = new IncludeExcludeFilter(packageInclude, packageExclude);
}
timer.event("urlset");
Set<RequireDescriptors> requireDescriptors = options.getAll(DeploymentFilterable.CLASSPATH_REQUIRE_DESCRIPTOR, RequireDescriptors.CLIENT);
boolean filterDescriptors = options.get(DeploymentFilterable.CLASSPATH_FILTER_DESCRIPTORS, false);
boolean filterSystemApps = options.get(DeploymentFilterable.CLASSPATH_FILTER_SYSTEMAPPS, true);
try {
UrlSet urlSet = new UrlSet(classLoader);
timer.event("exclude system urls");