public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type, String label) {
    if (type == null || label == null) {
      throw new NullPointerException();
    }
    if (subtypeToLabel.containsKey(type) || labelToSubtype.containsKey(label)) {
      throw new IllegalArgumentException("types and labels must be unique");
    }
    labelToSubtype.put(label, type);
    subtypeToLabel.put(type, label);
    return this;
  }
Registers {@code type} identified by {@code label}. Labels are case sensitive.

@throws IllegalArgumentException if either {@code type} or {@code label} have already been
    registered on this type adapter.
db-scheduler/src/main/java/com/github/kagkarlsson/scheduler/serializer/gson/RuntimeTypeAdapterFactory.java