for (Module module : modules)
{
List<Capability> capabilities = module.getCapabilitiesRaw();
if (capabilities != null && capabilities.isEmpty() == false)
{
PackageRequirement requirement = new PackageRequirement(name, range);
for (Capability capability : capabilities)
{
if (capability instanceof PackageCapability && capability.resolves(module, requirement))
{
ExportPackage exportPackage = new ExportPackage(module, (PackageCapability)capability);