if (header == null) return false;
for (HeaderValue value : header.getHeaderValues()) {
String requireSpec = value.getUnwrappedText();
// first check if the clause is set to re-export, if not, we can skip the more expensive checks
Directive directive = ((Clause)value).getDirective(VISIBILITY_DIRECTIVE);
if (directive == null) {
continue; // skip to the next require
}
if (VISIBILITY_REEXPORT.equals(directive.getValue())) {
// ok it's a re-export. Now check if the bundle would satisfy the dependency
if (otherBundle.isRequiredBundle(requireSpec)) {
return true;
}
}