sa-jdi

import sun.jvm.hotspot.debugger.UnalignedAddressException;
import sun.jvm.hotspot.debugger.UnmappedAddressException;

public abstract interface JIntField
  extends Field
{
  public abstract int getValue(Address paramAddress)
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
  
  public abstract int getValue()
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.types.JIntField
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.types;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.UnalignedAddressException;
import sun.jvm.hotspot.debugger.UnmappedAddressException;

public abstract interface JLongField
  extends Field
{
  public abstract long getValue(Address paramAddress)
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
  
  public abstract long getValue()
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.types.JLongField
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.types;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.UnalignedAddressException;
import sun.jvm.hotspot.debugger.UnmappedAddressException;

public abstract interface JShortField
  extends Field
{
  public abstract short getValue(Address paramAddress)
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
  
  public abstract short getValue()
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.types.JShortField
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.types;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.debugger.UnalignedAddressException;
import sun.jvm.hotspot.debugger.UnmappedAddressException;

public abstract interface NarrowOopField
  extends OopField
{
  public abstract OopHandle getValue(Address paramAddress)
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
  
  public abstract OopHandle getValue()
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.types.NarrowOopField
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.types;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.debugger.UnalignedAddressException;
import sun.jvm.hotspot.debugger.UnmappedAddressException;

public abstract interface OopField
  extends Field
{
  public abstract OopHandle getValue(Address paramAddress)
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
  
  public abstract OopHandle getValue()
    throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.types.OopField
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.types;

public abstract interface PointerType
  extends Type
{
  public abstract Type getTargetType();
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.types.PointerType
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.types;

import java.util.Iterator;

public abstract interface Type
{
  public abstract String getName();
  
  public abstract Type getSuperclass();
  
  public abstract long getSize();
  
  public abstract boolean isCIntegerType();
  
  public abstract boolean isCStringType();
  
  public abstract boolean isJavaPrimitiveType();
  
  public abstract boolean isOopType();
  
  public abstract boolean isPointerType();
  
  public abstract Field getField(String paramString, boolean paramBoolean1, boolean paramBoolean2);
  
  public abstract Field getField(String paramString, boolean paramBoolean);
  
  public abstract Field getField(String paramString);
  
  public abstract Field getField(String paramString, Type paramType, boolean paramBoolean)
    throws WrongTypeException;
  
  public abstract Field getField(String paramString, Type paramType)
    throws WrongTypeException;
  
  public abstract Iterator getFields();
  
  public abstract JBooleanField getJBooleanField(String paramString)
    throws WrongTypeException;
  
  public abstract JByteField getJByteField(String paramString)
    throws WrongTypeException;
  
  public abstract JCharField getJCharField(String paramString)
    throws WrongTypeException;
  
  public abstract JDoubleField getJDoubleField(String paramString)
    throws WrongTypeException;
  
  public abstract JFloatField getJFloatField(String paramString)
    throws WrongTypeException;
  
  public abstract JIntField getJIntField(String paramString)
    throws WrongTypeException;
  
  public abstract JLongField getJLongField(String paramString)
    throws WrongTypeException;
  
  public abstract JShortField getJShortField(String paramString)
    throws WrongTypeException;
  
  public abstract CIntegerField getCIntegerField(String paramString)
    throws WrongTypeException;
  
  public abstract OopField getOopField(String paramString)
    throws WrongTypeException;
  
  public abstract NarrowOopField getNarrowOopField(String paramString)
    throws WrongTypeException;
  
  public abstract AddressField getAddressField(String paramString);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.types.Type
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.types;

import java.util.Iterator;
import sun.jvm.hotspot.debugger.Address;

public abstract interface TypeDataBase
{
  public abstract Type lookupType(String paramString);
  
  public abstract Type lookupType(String paramString, boolean paramBoolean);
  
  public abstract Integer lookupIntConstant(String paramString);
  
  public abstract Integer lookupIntConstant(String paramString, boolean paramBoolean);
  
  public abstract Long lookupLongConstant(String paramString);
  
  public abstract Long lookupLongConstant(String paramString, boolean paramBoolean);
  
  public abstract Type getJBooleanType();
  
  public abstract Type getJByteType();
  
  public abstract Type getJCharType();
  
  public abstract Type getJDoubleType();
  
  public abstract Type getJFloatType();
  
  public abstract Type getJIntType();
  
  public abstract Type getJLongType();
  
  public abstract Type getJShortType();
  
  public abstract long getAddressSize();
  
  public abstract long getOopSize();
  
  public abstract boolean addressTypeIsEqualToType(Address paramAddress, Type paramType);
  
  public abstract Type guessTypeForAddress(Address paramAddress);
  
  public abstract Iterator getTypes();
  
  public abstract Iterator getIntConstants();
  
  public abstract Iterator getLongConstants();
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.types.TypeDataBase
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.types;

public class WrongTypeException
  extends RuntimeException
{
  public WrongTypeException() {}
  
  public WrongTypeException(String detail)
  {
    super(detail);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.types.WrongTypeException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui.action;

import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.DelegateAction;

public class FindAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "find-command";
  public static final String VALUE_NAME = "Find Objects";
  public static final String VALUE_SMALL_ICON = "general/Find16.gif";
  public static final Integer VALUE_MNEMONIC = new Integer(70);
  public static final String VALUE_SHORT_DESCRIPTION = "Find Objects of this Type";
  public static final String VALUE_LONG_DESCRIPTION = "Find Objects of this Type";
  
  public FindAction()
  {
    super("Find Objects", ActionManager.getIcon("general/Find16.gif"));
    
    putValue("ActionCommandKey", "find-command");
    putValue("ShortDescription", "Find Objects of this Type");
    putValue("LongDescription", "Find Objects of this Type");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.action.FindAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui.action;

import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.DelegateAction;

public class FindClassesAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "find-classes-command";
  public static final String VALUE_NAME = "Find classes";
  public static final String VALUE_SMALL_ICON = "general/Find16.gif";
  public static final Integer VALUE_MNEMONIC = new Integer(67);
  public static final String VALUE_SHORT_DESCRIPTION = "Find classes with given name part";
  public static final String VALUE_LONG_DESCRIPTION = "Find classes with given name part";
  
  public FindClassesAction()
  {
    super("Find classes", ActionManager.getIcon("general/Find16.gif"));
    
    putValue("ActionCommandKey", "find-classes-command");
    putValue("ShortDescription", "Find classes with given name part");
    putValue("LongDescription", "Find classes with given name part");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.action.FindClassesAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui.action;

import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.DelegateAction;

public class FindCrashesAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "find-crashes-command";
  public static final String VALUE_NAME = "Find Crashes...";
  public static final String VALUE_SMALL_ICON = "general/Delete16.gif";
  public static final String VALUE_LARGE_ICON = "general/Delete24.gif";
  public static final Integer VALUE_MNEMONIC = new Integer(72);
  public static final String VALUE_SHORT_DESCRIPTION = "Find Crashes";
  public static final String VALUE_LONG_DESCRIPTION = "Searches the threads for potential crashes";
  
  public FindCrashesAction()
  {
    super("Find Crashes...", ActionManager.getIcon("general/Delete16.gif"));
    
    putValue("ActionCommandKey", "find-crashes-command");
    putValue("ShortDescription", "Find Crashes");
    putValue("LongDescription", "Searches the threads for potential crashes");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.action.FindCrashesAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui.action;

import com.sun.java.swing.action.ActionManager;

public class HSDBActionManager
  extends ActionManager
{
  public static ActionManager getInstance()
  {
    if (manager == null) {
      manager = new HSDBActionManager();
    }
    return manager;
  }
  
  protected void addActions()
  {
    addAction("find-command", new FindAction());
    addAction("show-command", new ShowAction());
    
    addAction("inspect-command", new InspectAction());
    addAction("memory-command", new MemoryAction());
    addAction("thread-info-command", new ThreadInfoAction());
    addAction("find-crashes-command", new FindCrashesAction());
    addAction("jstack-command", new JavaStackTraceAction());
    
    addAction("find-classes-command", new FindClassesAction());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.action.HSDBActionManager
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui.action;

import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.DelegateAction;

public class InspectAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "inspect-command";
  public static final String VALUE_NAME = "Inspect Thread...";
  public static final String VALUE_SMALL_ICON = "general/ZoomIn16.gif";
  public static final String VALUE_LARGE_ICON = "general/ZoomIn24.gif";
  public static final Integer VALUE_MNEMONIC = new Integer(84);
  public static final String VALUE_SHORT_DESCRIPTION = "Inspect selected thread";
  public static final String VALUE_LONG_DESCRIPTION = "Open an inspector on the selected thread";
  
  public InspectAction()
  {
    super("Inspect Thread...", ActionManager.getIcon("general/ZoomIn16.gif"));
    
    putValue("ActionCommandKey", "inspect-command");
    putValue("ShortDescription", "Inspect selected thread");
    putValue("LongDescription", "Open an inspector on the selected thread");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.action.InspectAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui.action;

import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.DelegateAction;

public class JavaStackTraceAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "jstack-command";
  public static final String VALUE_NAME = "Show Java stack trace";
  public static final String VALUE_SMALL_ICON = "general/History16.gif";
  public static final String VALUE_LARGE_ICON = "general/History24.gif";
  public static final Integer VALUE_MNEMONIC = new Integer(74);
  public static final String VALUE_SHORT_DESCRIPTION = "Show Java stack trace for selected thread";
  public static final String VALUE_LONG_DESCRIPTION = "Show Java stack trace for selected thread";
  
  public JavaStackTraceAction()
  {
    super("Show Java stack trace", ActionManager.getIcon("general/History16.gif"));
    
    putValue("ActionCommandKey", "jstack-command");
    putValue("ShortDescription", "Show Java stack trace for selected thread");
    putValue("LongDescription", "Show Java stack trace for selected thread");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.action.JavaStackTraceAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui.action;

import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.DelegateAction;

public class MemoryAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "memory-command";
  public static final String VALUE_NAME = "Stack Memory...";
  public static final String VALUE_SMALL_ICON = "development/Server16.gif";
  public static final String VALUE_LARGE_ICON = "development/Server24.gif";
  public static final Integer VALUE_MNEMONIC = new Integer(77);
  public static final String VALUE_SHORT_DESCRIPTION = "Show Stack Memory";
  public static final String VALUE_LONG_DESCRIPTION = "Show the stack memory for the current thread";
  
  public MemoryAction()
  {
    super("Stack Memory...", ActionManager.getIcon("development/Server16.gif"));
    
    putValue("ActionCommandKey", "memory-command");
    putValue("ShortDescription", "Show Stack Memory");
    putValue("LongDescription", "Show the stack memory for the current thread");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.action.MemoryAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui.action;

import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.DelegateAction;

public class ShowAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "show-command";
  public static final String VALUE_NAME = "Show Objects";
  public static final String VALUE_SMALL_ICON = "general/Zoom16.gif";
  public static final Integer VALUE_MNEMONIC = new Integer(83);
  public static final String VALUE_SHORT_DESCRIPTION = "Show Objects of this selected type";
  public static final String VALUE_LONG_DESCRIPTION = "Show Objects of this selected type";
  
  public ShowAction()
  {
    super("Show Objects", ActionManager.getIcon("general/Zoom16.gif"));
    
    putValue("ActionCommandKey", "show-command");
    putValue("ShortDescription", "Show Objects of this selected type");
    putValue("LongDescription", "Show Objects of this selected type");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.action.ShowAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui.action;

import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.StateChangeAction;

public class ThreadInfoAction
  extends StateChangeAction
{
  public static final String VALUE_COMMAND = "thread-info-command";
  public static final String VALUE_NAME = "Show Thread Information...";
  public static final String VALUE_SMALL_ICON = "general/Information16.gif";
  public static final String VALUE_LARGE_ICON = "general/Information24.gif";
  public static final Integer VALUE_MNEMONIC = new Integer(73);
  public static final String VALUE_SHORT_DESCRIPTION = "Show Thread Informaion";
  public static final String VALUE_LONG_DESCRIPTION = "Show information about the current thread";
  
  public ThreadInfoAction()
  {
    super("Show Thread Information...", ActionManager.getIcon("general/Information16.gif"));
    
    putValue("ActionCommandKey", "thread-info-command");
    putValue("ShortDescription", "Show Thread Informaion");
    putValue("LongDescription", "Show information about the current thread");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.action.ThreadInfoAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import java.util.Comparator;
import sun.jvm.hotspot.debugger.Address;

final class AnnotatedMemoryPanel$1
  implements Comparator
{
  private final AnnotatedMemoryPanel this$0;
  
  AnnotatedMemoryPanel$1(AnnotatedMemoryPanel paramAnnotatedMemoryPanel) {}
  
  public int compare(Object o1, Object o2)
  {
    Address a1 = (Address)o1;
    Address a2 = (Address)o2;
    if ((a1 == null) && (a2 == null)) {
      return 0;
    }
    if (a1 == null) {
      return -1;
    }
    if (a2 == null) {
      return 1;
    }
    if (a1.equals(a2)) {
      return 0;
    }
    if (a1.lessThan(a2)) {
      return -1;
    }
    return 1;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.AnnotatedMemoryPanel.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import java.awt.event.HierarchyBoundsListener;
import java.awt.event.HierarchyEvent;

final class AnnotatedMemoryPanel$2
  implements HierarchyBoundsListener
{
  private final AnnotatedMemoryPanel this$0;
  
  AnnotatedMemoryPanel$2(AnnotatedMemoryPanel paramAnnotatedMemoryPanel) {}
  
  public void ancestorMoved(HierarchyEvent e) {}
  
  public void ancestorResized(HierarchyEvent e) {}
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.AnnotatedMemoryPanel.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import java.awt.event.ActionEvent;
import java.math.BigInteger;
import javax.swing.AbstractAction;

final class AnnotatedMemoryPanel$3
  extends AbstractAction
{
  private final AnnotatedMemoryPanel this$0;
  
  AnnotatedMemoryPanel$3(AnnotatedMemoryPanel paramAnnotatedMemoryPanel) {}
  
  public void actionPerformed(ActionEvent e)
  {
    AnnotatedMemoryPanel.access$000(this$0).setValueHP(AnnotatedMemoryPanel.access$000(this$0).getValueHP().add(AnnotatedMemoryPanel.access$000(this$0).getBlockIncrementHP()));
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.AnnotatedMemoryPanel.3
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import java.awt.event.ActionEvent;
import java.math.BigInteger;
import javax.swing.AbstractAction;

final class AnnotatedMemoryPanel$4
  extends AbstractAction
{
  private final AnnotatedMemoryPanel this$0;
  
  AnnotatedMemoryPanel$4(AnnotatedMemoryPanel paramAnnotatedMemoryPanel) {}
  
  public void actionPerformed(ActionEvent e)
  {
    AnnotatedMemoryPanel.access$000(this$0).setValueHP(AnnotatedMemoryPanel.access$000(this$0).getValueHP().subtract(AnnotatedMemoryPanel.access$000(this$0).getBlockIncrementHP()));
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.AnnotatedMemoryPanel.4
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import java.awt.event.ActionEvent;
import java.math.BigInteger;
import javax.swing.AbstractAction;

final class AnnotatedMemoryPanel$5
  extends AbstractAction
{
  private final AnnotatedMemoryPanel this$0;
  
  AnnotatedMemoryPanel$5(AnnotatedMemoryPanel paramAnnotatedMemoryPanel) {}
  
  public void actionPerformed(ActionEvent e)
  {
    AnnotatedMemoryPanel.access$000(this$0).setValueHP(AnnotatedMemoryPanel.access$000(this$0).getValueHP().add(AnnotatedMemoryPanel.access$000(this$0).getUnitIncrementHP()));
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.AnnotatedMemoryPanel.5
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import java.awt.event.ActionEvent;
import java.math.BigInteger;
import javax.swing.AbstractAction;

final class AnnotatedMemoryPanel$6
  extends AbstractAction
{
  private final AnnotatedMemoryPanel this$0;
  
  AnnotatedMemoryPanel$6(AnnotatedMemoryPanel paramAnnotatedMemoryPanel) {}
  
  public void actionPerformed(ActionEvent e)
  {
    AnnotatedMemoryPanel.access$000(this$0).setValueHP(AnnotatedMemoryPanel.access$000(this$0).getValueHP().subtract(AnnotatedMemoryPanel.access$000(this$0).getUnitIncrementHP()));
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.AnnotatedMemoryPanel.6
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

final class AnnotatedMemoryPanel$7
  implements ChangeListener
{
  private final AnnotatedMemoryPanel this$0;
  
  AnnotatedMemoryPanel$7(AnnotatedMemoryPanel paramAnnotatedMemoryPanel) {}
  
  public void stateChanged(ChangeEvent e)
  {
    HighPrecisionJScrollBar h = (HighPrecisionJScrollBar)e.getSource();
    this$0.repaint();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.AnnotatedMemoryPanel.7
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

final class AnnotatedMemoryPanel$8
  extends WindowAdapter
{
  public void windowClosed(WindowEvent e)
  {
    System.exit(0);
  }
  
  public void windowClosing(WindowEvent e)
  {
    System.exit(0);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.AnnotatedMemoryPanel.8
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import sun.jvm.hotspot.debugger.Address;

class AnnotatedMemoryPanel$AnnoX
{
  int lineX;
  Address highBound;
  
  public AnnotatedMemoryPanel$AnnoX(int lineX, Address highBound)
  {
    this.lineX = lineX;
    this.highBound = highBound;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.ui.AnnotatedMemoryPanel.AnnoX
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.ui;

import java.awt.BasicStroke;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.Stroke;
import java.awt.event.ActionEvent;
import java.awt.event.HierarchyBoundsListener;
import java.awt.event.HierarchyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.geom.Rectangle2D;
import java.io.PrintStream;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.Stack;
import javax.swing.AbstractAction;
import javax.swing.ActionMap;
import javax.swing.InputMap;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.KeyStroke;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.Debugger;
import sun.jvm.hotspot.debugger.MachineDescriptionIntelX86;
import sun.jvm.hotspot.debugger.UnmappedAddressException;
import sun.jvm.hotspot.debugger.dummy.DummyDebugger;
import sun.jvm.hotspot.utilities.Assert;
import sun.jvm.hotspot.utilities.Interval;
import sun.jvm.hotspot.utilities.IntervalNode;
import sun.jvm.hotspot.utilities.IntervalTree;

public class AnnotatedMemoryPanel
  extends JPanel
{
  private boolean is64Bit;
  private Debugger debugger;
  private long addressSize;
  private HighPrecisionJScrollBar scrollBar;
  private Font font;
  private int bytesPerLine;
  private int paintCount;
  private String unmappedAddrString;
  private IntervalTree annotations = new IntervalTree(new Comparator()
  {
    public int compare(Object o1, Object o2)
    {
      Address a1 = (Address)o1;
      Address a2 = (Address)o2;
      if ((a1 == null) && (a2 == null)) {
        return 0;
      }
      if (a1 == null) {
        return -1;
      }
      if (a2 == null) {
        return 1;
      }
      if (a1.equals(a2)) {
        return 0;
      }
      if (a1.lessThan(a2)) {
        return -1;
      }
      return 1;
    }
  });
  private Address lastStartAddr;
  private List visibleAnnotations;
  private static Color[] colors = { new Color(0.0F, 0.0F, 0.6F), new Color(0.6F, 0.0F, 0.6F), new Color(0.0F, 0.8F, 0.0F), new Color(0.8F, 0.3F, 0.0F), new Color(0.0F, 0.6F, 0.8F), new Color(0.2F, 0.2F, 0.2F) };
  
  public AnnotatedMemoryPanel(Debugger debugger)
  {
    this(debugger, false);
  }
  
  public AnnotatedMemoryPanel(Debugger debugger, boolean is64Bit, Address addrValue, Address addrLow, Address addrHigh)
  {
    init(debugger, is64Bit, addressToBigInt(addrValue), addressToBigInt(addrLow), addressToBigInt(addrHigh));
  }
  
  public AnnotatedMemoryPanel(Debugger debugger, boolean is64Bit)
  {
    init(debugger, is64Bit, defaultMemoryLocation(is64Bit), defaultMemoryLow(is64Bit), defaultMemoryHigh(is64Bit));
  }
  
  static class AnnoX
  {
    int lineX;
    Address highBound;
    
    public AnnoX(int lineX, Address highBound)
    {
      this.lineX = lineX;
      this.highBound = highBound;
    }
  }
  
  public synchronized void paintComponent(Graphics g)
  {
    super.paintComponent(g);
    
    g = g.create();
    
    g.setFont(font);
    g.setColor(Color.black);
    Rectangle rect = new Rectangle();
    getBounds(rect);
    String firstAddressString = null;
    
    Rectangle2D bounds = GraphicsUtilities.getStringBounds(unmappedAddrString, g);
    int lineHeight = (int)bounds.getHeight();
    int addrWidth = (int)bounds.getWidth();
    
    int addrX = (int)(0.25D * addrWidth);
    int dataX = (int)(addrX + 1.5D * addrWidth);
    int lineStartX = dataX + addrWidth + 5;
    int annoStartX = (int)(lineStartX + 0.75D * addrWidth);
    
    int numLines = height / lineHeight;
    
    BigInteger startVal = scrollBar.getValueHP();
    BigInteger perLine = new BigInteger(Integer.toString((int)addressSize));
    
    BigInteger lineCount = new BigInteger(Integer.toString(numLines - 1));
    BigInteger maxLines = scrollBar.getMaximumHP().subtract(scrollBar.getMinimumHP()).divide(perLine);
    if (lineCount.compareTo(maxLines) > 0) {
      lineCount = maxLines;
    }
    BigInteger offsetVal = lineCount.multiply(perLine);
    BigInteger endVal = startVal.add(offsetVal);
    if (endVal.compareTo(scrollBar.getMaximumHP()) > 0)
    {
      startVal = scrollBar.getMaximumHP().subtract(offsetVal);
      endVal = scrollBar.getMaximumHP();
      
      scrollBar.setValueHP(startVal);
    }
    scrollBar.setVisibleAmountHP(offsetVal.add(perLine));
    scrollBar.setBlockIncrementHP(offsetVal);
    
    Address startAddr = bigIntToAddress(startVal);
    Address endAddr = bigIntToAddress(endVal);
    
    int scrollOffset = 0;
    if (lastStartAddr != null) {
      scrollOffset = (int)lastStartAddr.minus(startAddr);
    } else if (startAddr != null) {
      scrollOffset = (int)(-1L * startAddr.minus(lastStartAddr));
    }
    scrollOffset = scrollOffset * lineHeight / (int)addressSize;
    scrollAnnotations(scrollOffset);
    lastStartAddr = startAddr;
    
    int curY = lineHeight;
    Address curAddr = startAddr;
    for (int i = 0; i < numLines; i++)
    {
      String s = bigIntToHexString(startVal);
      g.drawString(s, addrX, curY);
      try
      {
        s = addressToString(startAddr.getAddressAt(i * addressSize));
      }
      catch (UnmappedAddressException e)
      {
        s = unmappedAddrString;
      }
      g.drawString(s, dataX, curY);
      curY += lineHeight;
      startVal = startVal.add(perLine);
    }
    List va = annotations.findAllNodesIntersecting(new Interval(startAddr.addOffsetTo(-addressSize), endAddr.addOffsetTo(2L * addressSize)));
    
    int curLineX = lineStartX;
    int curTextX = annoStartX;
    int curColorIdx = 0;
    if ((g instanceof Graphics2D))
    {
      Stroke stroke = new BasicStroke(3.0F);
      ((Graphics2D)g).setStroke(stroke);
    }
    Stack drawStack = new Stack();
    
    layoutAnnotations(va, g, curTextX, startAddr, lineHeight);
    for (Iterator iter = visibleAnnotations.iterator(); iter.hasNext();)
    {
      Annotation anno = (Annotation)iter.next();
      Interval interval = anno.getInterval();
      if (!drawStack.empty())
      {
        boolean shouldContinue = true;
        do
        {
          AnnoX annoX = (AnnoX)drawStack.peek();
          if (highBound.lessThanOrEqual((Address)interval.getLowEndpoint()))
          {
            curLineX = lineX;
            drawStack.pop();
            shouldContinue = !drawStack.empty();
          }
          else
          {
            shouldContinue = false;
          }
        } while (shouldContinue);
      }
      Address lineStartAddr = (Address)interval.getLowEndpoint();
      
      int lineStartY = (int)(lineStartAddr.minus(startAddr) * lineHeight / addressSize) + lineHeight / 3;
      
      Address lineEndAddr = (Address)interval.getHighEndpoint();
      drawStack.push(new AnnoX(curLineX, lineEndAddr));
      int lineEndY = (int)(lineEndAddr.minus(startAddr) * lineHeight / addressSize);
      g.setColor(anno.getColor());
      g.drawLine(curLineX, lineStartY, curLineX, lineEndY);
      
      g.drawLine(curLineX, lineStartY, curTextX - 10, anno.getY() - lineHeight / 2);
      curLineX += 8;
      anno.draw(g);
      curColorIdx++;
    }
  }
  
  public synchronized void addAnnotation(Annotation annotation)
  {
    annotations.insert(annotation.getInterval(), annotation);
  }
  
  public synchronized void makeVisible(Address addr)
  {
    BigInteger bi = addressToBigInt(addr);
    scrollBar.setValueHP(bi);
  }
  
  public void print()
  {
    printOn(System.out);
  }
  
  public void printOn(PrintStream tty)
  {
    annotations.printOn(tty);
  }
  
  private void init(Debugger debugger, boolean is64Bit, BigInteger addrValue, BigInteger addrLow, BigInteger addrHigh)
  {
    this.is64Bit = is64Bit;
    this.debugger = debugger;
    if (is64Bit)
    {
      addressSize = 8L;
      unmappedAddrString = "??????????????????";
    }
    else
    {
      addressSize = 4L;
      unmappedAddrString = "??????????";
    }
    setLayout(new BorderLayout());
    setupScrollBar(addrValue, addrLow, addrHigh);
    add(scrollBar, "East");
    visibleAnnotations = new ArrayList();
    setBackground(Color.white);
    addHierarchyBoundsListener(new HierarchyBoundsListener()
    {
      public void ancestorMoved(HierarchyEvent e) {}
      
      public void ancestorResized(HierarchyEvent e) {}
    });
    if (font == null) {
      font = GraphicsUtilities.lookupFont("Courier");
    }
    if (font == null) {
      throw new RuntimeException("Error looking up monospace font Courier");
    }
    getInputMap(2).put(KeyStroke.getKeyStroke(34, 0), "PageDown");
    getActionMap().put("PageDown", new AbstractAction()
    {
      public void actionPerformed(ActionEvent e)
      {
        scrollBar.setValueHP(scrollBar.getValueHP().add(scrollBar.getBlockIncrementHP()));
      }
    });
    getInputMap(2).put(KeyStroke.getKeyStroke(33, 0), "PageUp");
    getActionMap().put("PageUp", new AbstractAction()
    {
      public void actionPerformed(ActionEvent e)
      {
        scrollBar.setValueHP(scrollBar.getValueHP().subtract(scrollBar.getBlockIncrementHP()));
      }
    });
    getInputMap(2).put(KeyStroke.getKeyStroke(40, 0), "Down");
    getActionMap().put("Down", new AbstractAction()
    {
      public void actionPerformed(ActionEvent e)
      {
        scrollBar.setValueHP(scrollBar.getValueHP().add(scrollBar.getUnitIncrementHP()));
      }
    });
    getInputMap(2).put(KeyStroke.getKeyStroke(38, 0), "Up");
    getActionMap().put("Up", new AbstractAction()
    {
      public void actionPerformed(ActionEvent e)
      {
        scrollBar.setValueHP(scrollBar.getValueHP().subtract(scrollBar.getUnitIncrementHP()));
      }
    });
    setEnabled(true);
  }
  
  private void setupScrollBar(BigInteger value, BigInteger min, BigInteger max)
  {
    scrollBar = new HighPrecisionJScrollBar(1, value, min, max);
    if (is64Bit)
    {
      bytesPerLine = 8;
      
      scrollBar.setUnitIncrementHP(new BigInteger(1, new byte[] { 0, 0, 0, 0, 0, 0, 0, 8 }));
      
      scrollBar.setBlockIncrementHP(new BigInteger(1, new byte[] { 0, 0, 0, 0, 0, 0, 0, 64 }));
    }
    else
    {
      bytesPerLine = 4;
      scrollBar.setUnitIncrementHP(new BigInteger(1, new byte[] { 0, 0, 0, 4 }));
      
      scrollBar.setBlockIncrementHP(new BigInteger(1, new byte[] { 0, 0, 0, 32 }));
    }
    scrollBar.addChangeListener(new ChangeListener()
    {
      public void stateChanged(ChangeEvent e)
      {
        HighPrecisionJScrollBar h = (HighPrecisionJScrollBar)e.getSource();
        repaint();
      }
    });
  }
  
  private static BigInteger defaultMemoryLocation(boolean is64Bit)
  {
    if (is64Bit) {
      return new BigInteger(1, new byte[] { Byte.MIN_VALUE, 0, 0, 0, 0, 0, 0, 0 });
    }
    return new BigInteger(1, new byte[] { Byte.MIN_VALUE, 0, 0, 0 });
  }
  
  private static BigInteger defaultMemoryLow(boolean is64Bit)
  {
    if (is64Bit) {
      return new BigInteger(1, new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 });
    }
    return new BigInteger(1, new byte[] { 0, 0, 0, 0 });
  }
  
  private static BigInteger defaultMemoryHigh(boolean is64Bit)
  {
    if (is64Bit) {
      return new BigInteger(1, new byte[] { -1, -1, -1, -1, -1, -1, -1, -4 });
    }
    return new BigInteger(1, new byte[] { -1, -1, -1, -4 });
  }
  
  private void setupScrollBar()
  {
    setupScrollBar(defaultMemoryLocation(is64Bit), defaultMemoryLow(is64Bit), defaultMemoryHigh(is64Bit));
  }
  
  private String bigIntToHexString(BigInteger bi)
  {
    StringBuffer buf = new StringBuffer();
    buf.append("0x");
    String val = bi.toString(16);
    for (int i = 0; i < 2L * addressSize - val.length(); i++) {
      buf.append('0');
    }
    buf.append(val);
    return buf.toString();
  }
  
  private Address bigIntToAddress(BigInteger i)
  {
    String s = bigIntToHexString(i);
    return debugger.parseAddress(s);
  }
  
  private BigInteger addressToBigInt(Address a)
  {
    String s = addressToString(a);
    if (!s.startsWith("0x")) {
      throw new NumberFormatException(s);
    }
    return new BigInteger(s.substring(2), 16);
  }
  
  private String addressToString(Address a)
  {
    if (a == null)
    {
      if (is64Bit) {
        return "0x0000000000000000";
      }
      return "0x00000000";
    }
    return a.toString();
  }
  
  private void scrollAnnotations(int y)
  {
    for (Iterator iter = visibleAnnotations.iterator(); iter.hasNext();)
    {
      Annotation anno = (Annotation)iter.next();
      anno.setY(anno.getY() + y);
    }
  }
  
  private void layoutAnnotations(List va, Graphics g, int x, Address startAddr, int lineHeight)
  {
    if (va.size() == 0)
    {
      visibleAnnotations.clear();
      return;
    }
    int deferredIndex = -1;
    
    Annotation constraintAnnotation = null;
    
    Annotation firstConstraintAnnotation = null;
    
    int searchIndex = 0;
    
    List newAnnos = new ArrayList();
    for (Iterator iter = va.iterator(); iter.hasNext();)
    {
      Annotation anno = (Annotation)((IntervalNode)iter.next()).getData();
      
      boolean found = false;
      for (int i = searchIndex; i < visibleAnnotations.size(); i++)
      {
        Annotation el = (Annotation)visibleAnnotations.get(i);
        if (el.getLowAddress().greaterThan(anno.getLowAddress())) {
          break;
        }
        if (el == anno)
        {
          found = true;
          searchIndex = i;
          constraintAnnotation = anno;
          if (firstConstraintAnnotation != null) {
            break;
          }
          firstConstraintAnnotation = constraintAnnotation; break;
        }
      }
      if (!found) {
        if (constraintAnnotation != null)
        {
          layoutAfter(anno, constraintAnnotation, g, x, startAddr, lineHeight);
          constraintAnnotation = anno;
        }
        else
        {
          deferredIndex++;
        }
      }
      newAnnos.add(anno);
    }
    Iterator iter;
    if (firstConstraintAnnotation != null)
    {
      for (int i = deferredIndex; i >= 0; i--)
      {
        Annotation anno = (Annotation)newAnnos.get(i);
        layoutBefore(anno, firstConstraintAnnotation, g, x, startAddr, lineHeight);
        firstConstraintAnnotation = anno;
      }
    }
    else
    {
      if (Assert.ASSERTS_ENABLED) {
        Assert.that(constraintAnnotation == null, "logic error in layout code");
      }
      for (iter = newAnnos.iterator(); iter.hasNext();)
      {
        Annotation anno = (Annotation)iter.next();
        layoutAfter(anno, constraintAnnotation, g, x, startAddr, lineHeight);
        constraintAnnotation = anno;
      }
    }
    visibleAnnotations = newAnnos;
  }
  
  private void layoutBefore(Annotation anno, Annotation constraintAnno, Graphics g, int x, Address startAddr, int lineHeight)
  {
    anno.computeWidthAndHeight(g);
    if (constraintAnno != null) {
      anno.setColor(prevColor(constraintAnno.getColor()));
    } else {
      anno.setColor(colors[0]);
    }
    anno.setX(x);
    
    anno.setY((int)(((Address)anno.getInterval().getLowEndpoint()).minus(startAddr) * lineHeight / addressSize) + 5 * lineHeight / 6);
    if ((constraintAnno != null) && (anno.getY() + anno.getHeight() > constraintAnno.getY())) {
      anno.setY(constraintAnno.getY() - anno.getHeight());
    }
  }
  
  private void layoutAfter(Annotation anno, Annotation constraintAnno, Graphics g, int x, Address startAddr, int lineHeight)
  {
    anno.computeWidthAndHeight(g);
    if (constraintAnno != null) {
      anno.setColor(nextColor(constraintAnno.getColor()));
    } else {
      anno.setColor(colors[0]);
    }
    anno.setX(x);
    
    anno.setY((int)(((Address)anno.getInterval().getLowEndpoint()).minus(startAddr) * lineHeight / addressSize) + 5 * lineHeight / 6);
    if ((constraintAnno != null) && (anno.getY() < constraintAnno.getY() + constraintAnno.getHeight())) {
      anno.setY(constraintAnno.getY() + constraintAnno.getHeight());
    }
  }
  
  private Color prevColor(Color c)
  {
    int i = findColorIndex(c);
    if (i == 0) {
      return colors[(colors.length - 1)];
    }
    return colors[(i - 1)];
  }
  
  priva
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd