private void printObjs(List<Long> changedIds, List<Long> oldDomIds, List<Long> newDomIds, List<Boolean> addedByDirtySet, List<Long> changedIdx) { if (changedIds.size()>20) return; TreeMap<Integer,String> m = new TreeMap(); for (int i=0; i<changedIds.size(); i++) { Long iid = changedIds.get(i); Long oldDom = oldDomIds.get(i); Long newDom = newDomIds.get(i); Long index = changedIdx.get(i); Boolean addedByDirt = addedByDirtySet.get(i); Instance ii = heap.getInstanceByID(iid.longValue()); int number = ii.getInstanceNumber(); String text = "Index: "+index+(addedByDirt?" New ":" Old ")+printInstance(iid); text+=" OldDom "+printInstance(oldDom); text+=" NewDom: "+printInstance(newDom); m.put(number,text); } for (Integer in : m.keySet()) { System.out.println(m.get(in)); } }
String printInstance(Long instanceid) { if (instanceid == null || instanceid.longValue() == 0) { return "null"; } Instance ii = heap.getInstanceByID(instanceid.longValue()); return ii.getJavaClass().getName()+"#"+ii.getInstanceNumber(); }
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 } }
continue; } else if (instance instanceof PrimitiveArrayInstance) { assert false:"Error - PrimitiveArrayInstance not allowed "+instance.getJavaClass().getName()+"#"+instance.getInstanceNumber(); continue; } else if (instance instanceof ClassDumpInstance) {
private void printObjs(List<Long> changedIds, List<Long> oldDomIds, List<Long> newDomIds, List<Boolean> addedByDirtySet, List<Long> changedIdx) { if (changedIds.size()>20) return; TreeMap<Integer,String> m = new TreeMap(); for (int i=0; i<changedIds.size(); i++) { Long iid = changedIds.get(i); Long oldDom = oldDomIds.get(i); Long newDom = newDomIds.get(i); Long index = changedIdx.get(i); Boolean addedByDirt = addedByDirtySet.get(i); Instance ii = heap.getInstanceByID(iid.longValue()); int number = ii.getInstanceNumber(); String text = "Index: "+index+(addedByDirt?" New ":" Old ")+printInstance(iid); text+=" OldDom "+printInstance(oldDom); text+=" NewDom: "+printInstance(newDom); m.put(number,text); } for (Integer in : m.keySet()) { System.out.println(m.get(in)); } }
String printInstance(Long instanceid) { if (instanceid == null || instanceid.longValue() == 0) { return "null"; } Instance ii = heap.getInstanceByID(instanceid.longValue()); return ii.getJavaClass().getName()+"#"+ii.getInstanceNumber(); }
String printInstance(Long instanceid) { if (instanceid == null || instanceid.longValue() == 0) { return "null"; } Instance ii = heap.getInstanceByID(instanceid.longValue()); return ii.getJavaClass().getName()+"#"+ii.getInstanceNumber(); }
private void printObjs(List<Long> changedIds, List<Long> oldDomIds, List<Long> newDomIds, List<Boolean> addedByDirtySet, List<Long> changedIdx) { if (changedIds.size()>20) return; TreeMap<Integer,String> m = new TreeMap(); for (int i=0; i<changedIds.size(); i++) { Long iid = changedIds.get(i); Long oldDom = oldDomIds.get(i); Long newDom = newDomIds.get(i); Long index = changedIdx.get(i); Boolean addedByDirt = addedByDirtySet.get(i); Instance ii = heap.getInstanceByID(iid.longValue()); int number = ii.getInstanceNumber(); String text = "Index: "+index+(addedByDirt?" New ":" Old ")+printInstance(iid); text+=" OldDom "+printInstance(oldDom); text+=" NewDom: "+printInstance(newDom); m.put(number,text); } for (Integer in : m.keySet()) { System.out.println(m.get(in)); } }
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 } }
continue; } else if (instance instanceof PrimitiveArrayInstance) { assert false:"Error - PrimitiveArrayInstance not allowed "+instance.getJavaClass().getName()+"#"+instance.getInstanceNumber(); continue; } else if (instance instanceof ClassDumpInstance) {
continue; } else if (instance instanceof PrimitiveArrayInstance) { assert false:"Error - PrimitiveArrayInstance not allowed "+instance.getJavaClass().getName()+"#"+instance.getInstanceNumber(); continue; } else if (instance instanceof ClassDumpInstance) {