code: private int calculateTypeId(Class<?> type) {
      if (type == null)
        throw new NullPointerException("type cannot be null");
      return hasher.hash32(type.getName());
    }
docs: Returns the type ID for the given class.