// for all distinct resource types...
//
while (i.hasNext())
{
String path = (String)i.next();
ResourceDefinition resource = getResourceDefinition(path);
Iterator j = resource.getCapabilityDefinitions().iterator();
//
// read through the capability definitions and try to
// match the impl or interface class
//
while (j.hasNext())
{
CapabilityDefinition capability = (CapabilityDefinition)j.next();
Class next = capability.getImplementationClass();
if (capabilityClass.isAssignableFrom(next))
matches.add(resource.getContextPath());
}
}
return matches;
}