code: public static Method tryGetMethod(String id) {
      if (id.length() != NAME_LEN) {
        // we use it to fast discard the request without doing map lookup
        return null;
      }
      return idToMethod.get(id);
    }
docs: Tries to get a method given the id.
  Returns null if no such method is registered.