Improve performance^10 by ignoring all JARs that don't have the EvA substring.

This commit is contained in:
Fabian Becker 2014-10-20 19:18:27 +02:00
parent b7b88f4415
commit 57f4d35c46

View File

@ -228,6 +228,11 @@ public class ReflectPackage {
for (String aDynCP : dynCP) {
if (aDynCP.endsWith(".jar")) {
// Skip JARs that don't start with the EvA substring.
// This improves performance a lot when having a lot of JARs on the classpath
if (!aDynCP.substring(0, aDynCP.lastIndexOf(System.getProperty("file.separator"))).contains("EvA")) {
continue;
}
getClassesFromJarFltr(set, aDynCP, pkg, includeSubs, reqSuperCls);
} else {
getClassesFromFilesFltr(set, aDynCP, pkg, includeSubs, reqSuperCls);