static String getString(Instance stringInstance) { if (stringInstance == null) { return "*null*"; // NOI18N } String className = stringInstance.getJavaClass().getName(); if (String.class.getName().equals(className)) { PrimitiveArrayDump chars = (PrimitiveArrayDump) stringInstance.getValueOfField("value"); // NOI18N if (chars != null) { Integer offset = (Integer) stringInstance.getValueOfField("offset"); // NOI18N Integer len = (Integer) stringInstance.getValueOfField("count"); // NOI18N if (offset == null) { offset = Integer.valueOf(0); } if (len == null) { len = new Integer(chars.getLength()); } char[] charArr = chars.getChars(offset.intValue(), len.intValue()); return new String(charArr).intern(); } return "*null*"; // NOI18N } // what? Non-string in system properties? return "*"+className+"#"+stringInstance.getInstanceNumber()+"*"; // NOI18N } }
public long getSize() { long elementSize = dumpClass.getHprof().getValueSize(getType()); return dumpClass.classDumpSegment.getMinimumInstanceSize() + HPROF_ARRAY_OVERHEAD + (elementSize * getLength()); }
public List<Object> getValues() { HprofByteBuffer dumpBuffer = dumpClass.getHprofBuffer(); HprofHeap heap = dumpClass.getHprof(); byte type = getType(); long offset = getArrayStartOffset(); return new PrimitiveArrayLazyList(dumpBuffer, getLength(), offset, heap.getValueSize(type), type); }
static String getString(Instance stringInstance) { if (stringInstance == null) { return "*null*"; // NOI18N } String className = stringInstance.getJavaClass().getName(); if (String.class.getName().equals(className)) { PrimitiveArrayDump chars = (PrimitiveArrayDump) stringInstance.getValueOfField("value"); // NOI18N if (chars != null) { Integer offset = (Integer) stringInstance.getValueOfField("offset"); // NOI18N Integer len = (Integer) stringInstance.getValueOfField("count"); // NOI18N if (offset == null) { offset = Integer.valueOf(0); } if (len == null) { len = new Integer(chars.getLength()); } char[] charArr = chars.getChars(offset.intValue(), len.intValue()); return new String(charArr).intern(); } return "*null*"; // NOI18N } // what? Non-string in system properties? return "*"+className+"#"+stringInstance.getInstanceNumber()+"*"; // NOI18N } }
static String getString(Instance stringInstance) { if (stringInstance == null) { return "*null*"; // NOI18N } String className = stringInstance.getJavaClass().getName(); if (String.class.getName().equals(className)) { PrimitiveArrayDump chars = (PrimitiveArrayDump) stringInstance.getValueOfField("value"); // NOI18N if (chars != null) { Integer offset = (Integer) stringInstance.getValueOfField("offset"); // NOI18N Integer len = (Integer) stringInstance.getValueOfField("count"); // NOI18N if (offset == null) { offset = Integer.valueOf(0); } if (len == null) { len = new Integer(chars.getLength()); } char[] charArr = chars.getChars(offset.intValue(), len.intValue()); return new String(charArr).intern(); } return "*null*"; // NOI18N } // what? Non-string in system properties? return "*"+className+"#"+stringInstance.getInstanceNumber()+"*"; // NOI18N } }
public long getSize() { long elementSize = dumpClass.getHprof().getValueSize(getType()); return dumpClass.classDumpSegment.getMinimumInstanceSize() + HPROF_ARRAY_OVERHEAD + (elementSize * getLength()); }
public long getSize() { long elementSize = dumpClass.getHprof().getValueSize(getType()); return dumpClass.classDumpSegment.getMinimumInstanceSize() + HPROF_ARRAY_OVERHEAD + (elementSize * getLength()); }
public List /*<String>*/ getValues() { HprofByteBuffer dumpBuffer = dumpClass.getHprofBuffer(); HprofHeap heap = dumpClass.getHprof(); byte type = getType(); long offset = getArrayStartOffset(); return new PrimitiveArrayLazyList(dumpBuffer, getLength(), offset, heap.getValueSize(type), type); }
public List<Object> getValues() { HprofByteBuffer dumpBuffer = dumpClass.getHprofBuffer(); HprofHeap heap = dumpClass.getHprof(); byte type = getType(); long offset = getArrayStartOffset(); return new PrimitiveArrayLazyList(dumpBuffer, getLength(), offset, heap.getValueSize(type), type); }