{
final Collection operations;
if (this.metaObject instanceof org.eclipse.uml2.Class)
{
operations = new LinkedHashSet(((org.eclipse.uml2.Class)this.metaObject).getOwnedOperations());
final Collection dependencies = new FilteredCollection(this.metaObject.getClientDependencies())
{
public boolean evaluate(Object object)
{
return object instanceof Abstraction;
}
};
for (Iterator abstractionIterator = dependencies.iterator(); abstractionIterator.hasNext();)
{
final Abstraction abstraction = (Abstraction)abstractionIterator.next();
final List suppliers = abstraction.getSuppliers();
for (int i = 0; i < suppliers.size(); i++)
{
final Object supplierObject = suppliers.get(i);
if (supplierObject instanceof Interface)
{
operations.addAll(resolveInterfaceOperationsRecursively((Interface)supplierObject));
}
}
}
}
else if (this.metaObject instanceof org.eclipse.uml2.Interface)
{
operations = new LinkedHashSet(((org.eclipse.uml2.Interface)this.metaObject).getOwnedOperations());
}
else
{
operations = Collections.EMPTY_LIST;
}