Esempio n. 1
0
 private String getReferencingFieldName(IObject object, IObject referencingObject)
     throws SnapshotException {
   for (NamedReference ref : object.getOutboundReferences()) {
     if (ref.getObjectId() == referencingObject.getObjectId()) {
       return ref.getName();
     }
   }
   return null;
 }
Esempio n. 2
0
    protected String extractAttribute(IObject heapObject, long parentAddress) {
      StringBuilder s = new StringBuilder(64);

      List<NamedReference> refs = heapObject.getOutboundReferences();
      for (NamedReference reference : refs) {
        if (reference.getObjectAddress() == parentAddress) {
          if (s.length() > 0) s.append(", ");
          s.append(reference.getName());
        }
      }

      return s.toString();
    }