code: protected synchronized void addToMap(Class clazz) {
      if (classToIdMap.containsKey(clazz)) {
        return;
      }
      if (newClasses + 1 > Byte.MAX_VALUE) {
        throw new IndexOutOfBoundsException("adding an additional class would" +
        " exceed the maximum number allowed");
      }
      byte id = ++newClasses;
      addToMap(clazz, id);
    }
docs: Add a Class to the maps if it is not already present.