JBIterable<ServiceViewItem> (Object service, Class<?> contributorClass, boolean safe) { Object value = service instanceof ServiceViewProvidingContributor ? ((ServiceViewProvidingContributor<?, ?>)service).asService() : service; return doFindItems(node -> contributorClass.isInstance(node.getRootContributor()), node -> node.getValue().equals(value), safe); }