@Override
    public long heapSize() {
      long sum = ClassSize.REFERENCE + super.heapSize();
      if (this.value != null) {
        sum += ClassSize.sizeOf(this.value);
      }
      return sum;
    }
Made into a static method so as to reuse the logic within
ValueAndTagRewriteByteBufferExtendedCell
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java