{
for (Requirement requirement : getRequirements())
{
if (optional == false && requirement instanceof OptionalPackages)
{
OptionalPackages exported = (OptionalPackages) requirement;
Set<String> optionalPackages = exported.getOptionalPackageNames(this);
if (optionalPackages != null && packageNames.isEmpty() == false)
packageNames.removeAll(optionalPackages);
}
}
}