docs: private void handleWillCloseWhenClosed(XMethod xmethod, Obligation deletedObligation) {
          if (deletedObligation == null) {
              if (DEBUG_ANNOTATIONS) {
                  System.out.println("Method " + xmethod.toString() + " is marked @WillCloseWhenClosed, "
                          + "but its parameter is not an obligation");
              }
              return;
          }
  
          // See what type of obligation is being created.
          Obligation createdObligation = null;
          if ("<init>".equals(xmethod.getName())) {
              // Constructor - obligation type is the type of object being created
              // (or some supertype)
              createdObligation = database.getFactory().getObligationByType(xmethod.getClassDescriptor());
          } else {
              // Factory method - obligation type is the return type
              Type returnType = Type.getReturnType(xmethod.getSignature());
              if (returnType instanceof ObjectType) {
                  try {
                      createdObligation = database.getFactory().getObligationByType((ObjectType) returnType);
                  } catch (ClassNotFoundException e) {
                      reporter.reportMissingClass(e);
                      return;
                  }
              }
  
          }
          if (createdObligation == null) {
              if (DEBUG_ANNOTATIONS) {
                  System.out.println("Method " + xmethod.toString() + " is marked @WillCloseWhenClosed, "
                          + "but its return type is not an obligation");
              }
              return;
          }
  
          // Add database entries:
          // - parameter obligation is deleted
          // - return value obligation is added
          database.addEntry(new MatchMethodEntry(xmethod, ObligationPolicyDatabaseActionType.DEL,
                  ObligationPolicyDatabaseEntryType.STRONG, deletedObligation));
          database.addEntry(new MatchMethodEntry(xmethod, ObligationPolicyDatabaseActionType.ADD,
                  ObligationPolicyDatabaseEntryType.STRONG, createdObligation));
      }