private static void validate(KeyTypeEntry entry) throws GeneralSecurityException {
    if (entry.getTypeUrl().isEmpty()) {
      throw new GeneralSecurityException("Missing type_url.");
    }
    if (entry.getPrimitiveName().isEmpty()) {
      throw new GeneralSecurityException("Missing primitive_name.");
    }
    if (entry.getCatalogueName().isEmpty()) {
      throw new GeneralSecurityException("Missing catalogue_name.");
    }
  }
Tries to register a key manager according to the specification in {@code entry}.

@throws GeneralSecurityException if cannot register this config with the {@link Registry}. This
    usually happens when {@code entry} is already registered or the Registry cannot find any
    {@link com.google.crypto.tink.KeyManager} or {@link com.google.crypto.tink.Catalogue} that
    can handle the entry. In both cases the error message should show how to resolve it.
java_src/src/main/java/com/google/crypto/tink/Config.java