code: private static boolean hasReferences(Bean target, BeanId reference) {
          for (String name : target.getReferenceNames()) {
              for (BeanId ref : target.getReference(name)) {
                  if (ref.equals(reference)) {
                      return true;
                  }
              }
          }
          return false;
      }
docs: Returns the a list of property names of the target bean that have
  references to the bean id.