return new BundleAssignableClassFinder(packageAdmin, bundle, clses, classDiscoveryFilter);
}
@Override
protected boolean isClassAcceptable(String name, InputStream in) throws IOException {
ClassReader classReader = new ClassReader(in);
String className = classReader.getClassName();
if ((classReader.getAccess() & Opcodes.ACC_INTERFACE) == 0) {
if (targetClassNames.contains(className)) {
return true;
}
} else {
if (targetInterfaceNames.contains(className)) {
return true;
}
}
String[] interfaceNames = classReader.getInterfaces();
try {
for (String interfaceName : interfaceNames) {
if (wiredImportedPackageNames.contains(toASMStylePackageName(interfaceName))) {
return isClassAssignable(bundle.loadClass(toJavaStyleClassName(interfaceName)));
} else {
if (isInterfaceAssignable(interfaceName)) {
return true;
}
}
}
String superClassName = classReader.getSuperName();
if (wiredImportedPackageNames.contains(toASMStylePackageName(superClassName))) {
return isClassAssignable(bundle.loadClass(toJavaStyleClassName(superClassName)));
}
return isSuperClassAssignable(superClassName);
} catch (ClassNotFoundException e) {