docs: @Requires("e != null")
    @Ensures("result != null")
    private Boolean isContractedType(TypeElement e) {
      Boolean result = Boolean.FALSE;
  
      /* The current element has contracts on its annotations. */
      result = hasContracts(e.getAnnotationMirrors());
  
      /* Checks superclass. */
      if (!result) {
        Element superclass =
            utils.typeUtils.asElement(e.getSuperclass());
        if (superclass != null) {
          /* Scans up in the syntax tree looking for contract annotations. */
          result = superclass.accept(this, null);
        }
      }
  
      /* Checks interfaces. */
      if (!result) {
        Collection<? extends TypeMirror> interfaces = e.getInterfaces();
        for (TypeMirror i : interfaces) {
          Element iface = utils.typeUtils.asElement(i);
          result = iface.accept(this, null);
          if (result) {
            break;
          }
        }
      }
  
      /* Scan the enclosed elements of this. */
      if (!result) {
        List<? extends Element> enclosed = e.getEnclosedElements();
        for (Element element : enclosed) {
          result = element.accept(this, null);
          if (result) {
            break;
          }
        }
      }
  
      return result;
    }