code: public void endMethod() throws IOException {
      Scope popped = popScope();
      if (popped == Scope.NON_ABSTRACT_METHOD) {
        indent();
        out.write("}\n");
      } else if (popped != Scope.ABSTRACT_METHOD) {
        throw new IllegalStateException();
      }
    }
docs: Completes the current method declaration.