}
}
private List<ServiceElement> getMatchingServiceElements(final DeploymentMap dMap) {
List<ServiceElement> matching = new ArrayList<ServiceElement>();
AssociationDescriptor ad = association.getAssociationDescriptor();
String[] adInterfaces = ad.getInterfaceNames();
Arrays.sort(adInterfaces);
for(ServiceElement elem : dMap.getServiceElements()) {
List<String> list = new ArrayList<String>();
for(ClassBundle cb : elem.getExportBundles()) {
list.add(cb.getClassName());
}
String[] cbInterfaces = list.toArray(new String[list.size()]);
if(Arrays.equals(adInterfaces, cbInterfaces)) {
if(ad.matchOnName()) {
if(ad.getName().equals(elem.getName())) {
matching.add(elem);
}
} else {
matching.add(elem);
}