code: public static long shallowSizeOf(Class<?> clz) {
      if (PrimitiveTypeUtil.isPrimitive(clz)) {
        return PrimitiveTypeUtil.sizeOf(clz);
      } else if (clz.isArray()) {
        return THE_UNSAFE.arrayBaseOffset(clz);
      } else {
        long maxOffset = 0L;
        Field maxField = null;
        for (Field field : ReflectUtil.getAllFields(clz, false)) {
          long offset = THE_UNSAFE.objectFieldOffset(field);
          if (offset > maxOffset) {
            maxOffset = offset;
            maxField = field;
          }
        }
        if (maxOffset == 0) {
          maxOffset = HEADER_SIZE;
        } else if (maxOffset < HEADER_SIZE) {
          throw new IllegalStateException("Can't calculate " + clz + "'s size.");
        } else {
          maxOffset += refSizeOf(maxField.getType());
        }
        return regulateSize(maxOffset);
      }
    }
docs: Measure the SHALLOW size of the given class's instance.<br>
  If given an array class, only return the base offset (size of array of length 0).<br>
  For array class, use {@link UnsafeUtil#shallowSizeOf(Object)}.
  
  @param clz
  @return