1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 package ohos.devtools.views.layout.chartview.memory.heapdump; 17 18 import java.util.Objects; 19 20 /** 21 * HeapDumpThirdInfo 22 * 23 * @since 2021/11/22 24 */ 25 public class HeapDumpThirdInfo { 26 /** 27 * native Size 28 */ 29 protected long nativeSize; 30 31 /** 32 * shallow Size 33 */ 34 protected long shallowSize; 35 36 /** 37 * retained Size 38 */ 39 protected long retainedSize; 40 41 /** 42 * instanceId 43 */ 44 protected long instanceId; 45 46 /** 47 * isObj 48 */ 49 protected boolean isObj; 50 51 /** 52 * depth 53 */ 54 protected Integer depth; 55 getNativeSize()56 public long getNativeSize() { 57 return nativeSize; 58 } 59 setNativeSize(long nativeSize)60 public void setNativeSize(long nativeSize) { 61 this.nativeSize = nativeSize; 62 } 63 getShallowSize()64 public long getShallowSize() { 65 return shallowSize; 66 } 67 setShallowSize(long shallowSize)68 public void setShallowSize(long shallowSize) { 69 this.shallowSize = shallowSize; 70 } 71 getRetainedSize()72 public long getRetainedSize() { 73 return retainedSize; 74 } 75 setRetainedSize(long retainedSize)76 public void setRetainedSize(long retainedSize) { 77 this.retainedSize = retainedSize; 78 } 79 getInstanceId()80 public long getInstanceId() { 81 return instanceId; 82 } 83 setInstanceId(long instanceId)84 public void setInstanceId(long instanceId) { 85 this.instanceId = instanceId; 86 } 87 isObj()88 public boolean isObj() { 89 return isObj; 90 } 91 setObj(boolean obj)92 public void setObj(boolean obj) { 93 isObj = obj; 94 } 95 setDepth(Integer depth)96 public void setDepth(Integer depth) { 97 this.depth = depth; 98 } 99 getDepth()100 public Integer getDepth() { 101 return depth; 102 } 103 104 @Override equals(Object obj)105 public boolean equals(Object obj) { 106 return super.equals(obj); 107 } 108 109 @Override hashCode()110 public int hashCode() { 111 return Objects.hash(nativeSize, shallowSize, retainedSize, instanceId, isObj, depth); 112 } 113 114 @Override clone()115 protected Object clone() throws CloneNotSupportedException { 116 return super.clone(); 117 } 118 119 @Override toString()120 public String toString() { 121 return "HeapDumpThirdInfo{" 122 + "nativeSize=" 123 + nativeSize 124 + ", shallowSize=" 125 + shallowSize 126 + ", retainedSize=" 127 + retainedSize 128 + ", instanceId=" 129 + instanceId 130 + ", isObj=" 131 + isObj 132 + ", depth=" 133 + depth 134 + '}'; 135 } 136 } 137