// 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());
}
}