code: private void addMethodIfExist(DocEnv env, ClassSymbol def, String methodName) {
          Names names = def.name.table.names;
  
          for (Symbol sym : def.members().getSymbolsByName(names.fromString(methodName))) {
              if (sym.kind == MTH) {
                  MethodSymbol md = (MethodSymbol)sym;
                  if ((md.flags() & Flags.STATIC) == 0) {
                      /*
                       * WARNING: not robust if unqualifiedMethodName is overloaded
                       *          method. Signature checking could make more robust.
                       * READOBJECT takes a single parameter, java.io.ObjectInputStream.
                       * WRITEOBJECT takes a single parameter, java.io.ObjectOutputStream.
                       */
                      methods.append(env.getMethodDoc(md));
                  }
              }
          }
      }
docs: /*
  Catalog Serializable method if it exists in current ClassSymbol.
  Do not look for method in superclasses.
  
  Serialization requires these methods to be non-static.
  
  @param method should be an unqualified Serializable method
  name either READOBJECT, WRITEOBJECT, READRESOLVE
  or WRITEREPLACE.
  @param visibility the visibility flag for the given method.