for( ServiceModel serviceModel : serviceModels )
{
String identity = serviceModel.identity();
if( identities.contains( identity ) )
{
throw new DuplicateServiceIdentityException(
"Duplicated service identity: " + identity + " in module " + moduleModel.name()
);
}
identities.add( identity );
}
for( ImportedServiceModel serviceModel : importedServiceModels )
{
String identity = serviceModel.identity();
if( identities.contains( identity ) )
{
throw new DuplicateServiceIdentityException(
"Duplicated service identity: " + identity + " in module " + moduleModel.name()
);
}
identities.add( identity );
}