1 package jde.debugger.command;
3 import java.util.HashMap;
6 import jde.debugger.JDEException;
11 * DebugCommandFactory.java
14 * Created: Fri Jan 28 22:04:57 2000
16 * Copyright (c) 2000, 2001, 2003 Paul Kinnucan
18 * @author Paul Kinnucan
19 * @version $Revision: 1.10 $
22 public class DebugCommandFactory {
24 protected DebugCommandFactory() {
25 prototypes.put("attach_shmem", new AttachShmem());
26 prototypes.put("attach_socket", new AttachSocket());
27 prototypes.put("break", new Break());
28 prototypes.put("cancel_trace_classes", new CancelTraceClasses());
29 prototypes.put("cancel_trace_methods", new CancelTraceMethods());
30 prototypes.put("cancel_trace_threads", new CancelTraceThreads());
31 prototypes.put("clear", new Clear());
32 prototypes.put("debug_thread", new DebugThread()); // XXX - does not appear to be implemented on the lisp side
33 prototypes.put("evaluate", new EvaluateExpression());
34 prototypes.put("finish", new Finish());
35 prototypes.put("get_array", new GetArray());
36 prototypes.put("get_loaded_classes", new GetLoadedClasses());
37 prototypes.put("get_locals", new GetLocals());
38 prototypes.put("get_object", new GetObject());
39 prototypes.put("get_object_monitors", new GetObjectMonitors());
40 prototypes.put("get_path_information", new GetPathInfo());
41 prototypes.put("get_string", new GetString());
42 prototypes.put("get_this", new GetThis());
43 prototypes.put("get_thread", new GetThread());
44 prototypes.put("get_threads", new GetThreads());
45 prototypes.put("interrupt", new Interrupt());
46 prototypes.put("kill_thread", new KillThread());
47 prototypes.put("launch", new LaunchApplication());
48 prototypes.put("listen_shmem", new ListenShmem());
49 prototypes.put("listen_socket", new ListenSocket());
50 prototypes.put("quit", new Quit());
51 prototypes.put("resume", new Resume());
52 prototypes.put("run", new Run());
53 prototypes.put("stack_frame", new NullCommand());
54 prototypes.put("step", new Step());
55 prototypes.put("suspend", new Suspend());
56 prototypes.put("trace_classes", new TraceClasses());
57 prototypes.put("trace_exceptions", new TraceExceptions());
58 prototypes.put("trace_methods", new TraceMethods());
59 prototypes.put("trace_threads", new TraceThreads());
60 prototypes.put("watch", new Watch());
63 public final DebugCommand createCommand(Integer cmdID,
68 DebugCommand prototype = (DebugCommand) prototypes.get(cmdName);
70 if (prototype == null) return null;
72 DebugCommand cmd = (DebugCommand) prototype.clone();
73 cmd.init(cmdID, cmdName, args);
78 private HashMap prototypes = new HashMap();
80 public static DebugCommandFactory theFactory = new DebugCommandFactory();
82 } // DebugCommandFactory
86 * $Log: DebugCommandFactory.java,v $
87 * Revision 1.10 2003/04/29 16:52:09 troy
88 * Initial version of GUI. Includes display of local variables.
90 * Revision 1.9 2003/01/15 05:56:26 paulk
91 * Add Petter Mahlen's changes.
93 * Revision 1.8 2001/07/06 02:05:51 paulk
96 * Revision 1.7 2001/03/24 05:42:36 paulk
97 * Updated to reflect reorganization of debugger code.
99 * Revision 1.6 2000/10/20 04:19:00 paulk
100 * *** empty log message ***
102 * Revision 1.5 2000/07/28 06:27:02 paulk
103 * Committing all modified files.
105 * Revision 1.4 2000/04/10 05:36:50 paulk
106 * Added get_locals and get_this commands.
108 * Revision 1.3 2000/03/03 07:40:32 paulk
109 * Converted get_string and get_array commands from functions to objects.
111 * Revision 1.2 2000/01/31 12:41:45 paulk
112 * * Continue converting commands from functional to OO implementation.
114 * Revision 1.1 2000/01/30 12:35:20 paulk
115 * Creates debugger commands.
119 // End of DebugCommandFactory.java