net.wotonomy.ui.swing
Class ReferenceInspector

java.lang.Object
  extended by net.wotonomy.ui.swing.ReferenceInspector
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.util.EventListener

public class ReferenceInspector
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.ActionListener

ReferenceInspector tracks objects until they are garbage collected. Use it to track objects that you suspect are not being GCed. ReferenceInspector retains only weak references to the objects that it tracks, so when those weak references cannot be resolved, the object has been garbage collected. Note that under some GC implementations, adding a weak reference to an object will delay garbage collection for that object.

Version:
$Revision: 904 $
Author:
michael@mpowers.net

Nested Class Summary
 class ReferenceInspector.ExtendedWeakReference
           
 
Field Summary
static java.lang.String COPY
           
protected static net.wotonomy.ui.EODisplayGroup displayGroup
           
protected  javax.swing.JLabel memoryLabel
           
protected  javax.swing.JTable table
           
protected static javax.swing.JFrame window
           
 
Constructor Summary
ReferenceInspector()
          Launches a new ReferenceInspector if one does not already exist.
ReferenceInspector(java.lang.Object anObject)
          Adds the specified object to the ReferenceInspector, launching a new ReferenceInspector if one does not already exist.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
protected  void initLayout()
           
 void mouseClicked(java.awt.event.MouseEvent e)
          Double click to launch object inspector.
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected javax.swing.JTable table

memoryLabel

protected javax.swing.JLabel memoryLabel

displayGroup

protected static net.wotonomy.ui.EODisplayGroup displayGroup

window

protected static javax.swing.JFrame window

COPY

public static final java.lang.String COPY
See Also:
Constant Field Values
Constructor Detail

ReferenceInspector

public ReferenceInspector()
Launches a new ReferenceInspector if one does not already exist.


ReferenceInspector

public ReferenceInspector(java.lang.Object anObject)
Adds the specified object to the ReferenceInspector, launching a new ReferenceInspector if one does not already exist.

Method Detail

initLayout

protected void initLayout()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Double click to launch object inspector.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener


Copyright © 2006 null. All Rights Reserved.