jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java
changeset 25798 0b2f54e47bc4
parent 23010 6dadb192ad81
equal deleted inserted replaced
25797:671124b407ce 25798:0b2f54e47bc4
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   149         if (obj.getId() == -1) {
   149         if (obj.getId() == -1) {
   150             return;
   150             return;
   151         }
   151         }
   152         out.println("<h2>References to this object:</h2>");
   152         out.println("<h2>References to this object:</h2>");
   153         out.flush();
   153         out.flush();
   154         Enumeration referers = obj.getReferers();
   154         Enumeration<JavaThing> referers = obj.getReferers();
   155         while (referers.hasMoreElements()) {
   155         while (referers.hasMoreElements()) {
   156             JavaHeapObject ref = (JavaHeapObject) referers.nextElement();
   156             JavaHeapObject ref = (JavaHeapObject) referers.nextElement();
   157             printThing(ref);
   157             printThing(ref);
   158             print (" : " + ref.describeReferenceTo(obj, snapshot));
   158             print (" : " + ref.describeReferenceTo(obj, snapshot));
   159             // If there are more than one references, this only gets the
   159             // If there are more than one references, this only gets the