Methods Summary |
---|
public void | addExcludedClass(java.lang.String className)
excludedClasses.add(className);
|
public void | addExcludedPackage(java.lang.String pkgName)
excludedPackages.add(pkgName);
|
public void | addExcludedPattern(java.lang.String pattern)
excludedPatterns.add(pattern);
|
public boolean | buildClosure(java.util.jar.JarFile jar)
boolean result = true;
for (java.util.Enumeration entries = jar.entries();
entries.hasMoreElements();) {
String clsName = ((java.util.jar.JarEntry) entries.nextElement()).getName();
if (clsName.endsWith(".class")) { // NOI18N
String externalClsName = clsName.substring(0,
clsName.lastIndexOf(".class")) // NOI18N
.replace('/", '.");
boolean newresult = this.buildClosure(externalClsName);
result = newresult && result;
}
}//for all jar entries
return result;
|
public java.util.Collection | getNativeMethods()
throw new UnsupportedOperationException();
|
protected static java.lang.String | getPackageName(java.lang.String className)
int idx = className.lastIndexOf('.");
if (idx != -1) {
return className.substring(0, idx);
} else
return "";
|
protected boolean | needToBuildClosure(java.lang.String className)
boolean result = true;
if (visitedClasses.contains(className))
result = false;
else if (excludedClasses.contains(className)) {
result = false;
} else if (excludedPackages.contains(getPackageName(className))) {
result = false;
} else {
for (Iterator i = excludedPatterns.iterator(); i.hasNext();) {
String pattern = (String) i.next();
if (className.startsWith(pattern)) {
result = false;
break;
}
}
}
logger.logp(Level.FINEST, myClassName, "needToBuildClosure", // NOI18N
className + " " + result); // NOI18N
return result;
|