code: @SuppressWarnings("unchecked")
    public static ProtocolSignature getProtocolSignature(VersionedProtocol server,
        String protocol,
        long clientVersion, int clientMethodsHash) throws IOException {
      Class<? extends VersionedProtocol> inter;
      try {
        inter = (Class<? extends VersionedProtocol>)Class.forName(protocol);
      } catch (Exception e) {
        throw new IOException(e);
      }
      long serverVersion = server.getProtocolVersion(protocol, clientVersion);
      return ProtocolSignature.getProtocolSignature(
          clientMethodsHash, serverVersion, inter);
    }
docs: Get a server protocol's signature
  
  @param server server implementation
  @param protocol server protocol
  @param clientVersion client's version
  @param clientMethodsHash client's protocol's hash code
  @return the server protocol's signature
  @throws IOException if any error occurs