@Override
  public void register(int fixedId, Class<? extends DataSerializableFixedID> fixedIdClass) {
    try {
      Constructor<?> cons = fixedIdClass.getConstructor((Class<Object>[]) null);
      cons.setAccessible(true);
      if (!cons.isAccessible()) {
        throw new IllegalArgumentException(
            "default constructor not accessible " + "for DSFID=" + fixedId + ": " + fixedIdClass);
      }
      if (fixedId >= Byte.MIN_VALUE && fixedId <= Byte.MAX_VALUE) {
        int index = fixedId + Byte.MAX_VALUE + 1;
        if (dsfidMap[index] != null) {
          throw new IllegalArgumentException("A DataSerializableFixedID already exists for "
              + fixedId + " : " + dsfidMap[index].getName());
        }
        dsfidMap[index] = cons;
      } else {
        if (dsfidMap2.containsKey(fixedId)) {
          throw new IllegalArgumentException("A DataSerializableFixedID already exists for "
              + fixedId + " : " + dsfidMap2.get(fixedId).getName());
        }
        dsfidMap2.put(fixedId, cons);
      }
    } catch (NoSuchMethodException nsme) {
      throw new IllegalArgumentException("Unable to find a default constructor for " + fixedIdClass,
          nsme);
    }
  }
For backward compatibility this method should be used to invoke fromData on a DSFID or
DataSerializable. It will invoke the correct fromData method based on the class's version
information. This method does not read information about the class of the object. When
serializing use the method invokeToData to write the contents of the object.

@param ds the object to write
@param in the input stream.
geode-serialization/src/main/java/org/apache/geode/internal/serialization/internal/DSFIDSerializerImpl.java