Initial Commit
[packages] / xemacs-packages / jde / java / src / jde / debugger / command / GetObjectMonitors.java
1 package jde.debugger.command;
2 import com.sun.jdi.ObjectReference;
3 import jde.debugger.Etc;
4 import jde.debugger.JDEException;
5 import jde.debugger.Rep;
6
7
8 /**
9  * 'get_object_monitors' command. Information about the monitors
10  * corresponding to a particular object.
11  * <p>
12  *
13  * <b>Syntax:</b>
14  * <pre>
15  * get_object_monitors objectID
16  * </pre>
17  *
18  * <b>Returns:</b>
19  * <pre>
20  * (jde-dbo-command-result cmd_id 
21  *       {@link Rep#getObjectMonitorsRep(ObjectReference) object-monitors-info})
22  * </pre>
23  *
24  * Copyright (c) 2000, 2001, 2003    Paul Kinnucan
25  * 
26  * @author Paul Kinnucan
27  * @version $Revision: 1.2 $
28  *
29  */
30 public class GetObjectMonitors extends DebugProcessCommand {
31     
32   /**
33    *
34    * @exception jde.debugger.JDEException <description>
35    */
36   public void doCommand() throws JDEException {
37     if (m_args.size() != 1)
38       throw new JDEException("Insufficient arguments");
39         
40     Long            uniqueID = Etc.safeGetLong(m_args.remove(0), "object ID");
41     ObjectReference oRef     = m_debugger.getStore().get(uniqueID);
42     if (oRef == null) 
43       throw new JDEException("No such object exists");
44         
45     m_debugger.signalCommandResult(m_cmdID, Rep.getObjectMonitorsRep(oRef), CMD_OK, NOQUOTE);
46   }
47     
48     
49     
50   public Object clone() {return new GetObjectMonitors();}
51   
52 } // GetObjectMonitors
53
54 /*
55  * $Log: GetObjectMonitors.java,v $
56  * Revision 1.2  2003/01/15 05:56:26  paulk
57  * Add Petter Mahlen's changes.
58  *
59  * Revision 1.1  2001/03/24 05:52:14  paulk
60  * Initial version.
61  *
62  *
63  */
64
65 // End of GetObjectMonitors.java