KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > tools > example > debug > bdi > ExecutionManager


1 /*
2  * @(#)ExecutionManager.java 1.28 05/11/17
3  *
4  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 /*
8  * Copyright (c) 1997-1999 by Sun Microsystems, Inc. All Rights Reserved.
9  *
10  * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
11  * modify and redistribute this software in source and binary code form,
12  * provided that i) this copyright notice and license appear on all copies of
13  * the software; and ii) Licensee does not utilize the software in a manner
14  * which is disparaging to Sun.
15  *
16  * This software is provided "AS IS," without a warranty of any kind. ALL
17  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
18  * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
19  * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
20  * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
21  * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
22  * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
23  * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
24  * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
25  * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
26  * POSSIBILITY OF SUCH DAMAGES.
27  *
28  * This software is not designed or intended for use in on-line control of
29  * aircraft, air traffic, aircraft navigation or aircraft communications; or in
30  * the design, construction, operation or maintenance of any nuclear
31  * facility. Licensee represents and warrants that it will not use or
32  * redistribute the Software for such purposes.
33  */

34
35 package com.sun.tools.example.debug.bdi;
36
37 import com.sun.jdi.*;
38 import com.sun.jdi.event.*;
39 import com.sun.jdi.request.*;
40 import com.sun.jdi.connect.*;
41 import com.sun.tools.example.debug.expr.ExpressionParser;
42 import com.sun.tools.example.debug.expr.ParseException;
43
44 import java.io.*;
45 import java.util.*;
46
47 import com.sun.tools.example.debug.event.*;
48
49 import javax.swing.SwingUtilities JavaDoc;
50
51 /**
52  * Move this towards being only state and functionality
53  * that spans across Sessions (and thus VMs).
54  */

55 public class ExecutionManager {
56
57     private Session session;
58
59     /**
60      * Get/set JDI trace mode.
61      */

62     int traceMode = VirtualMachine.TRACE_NONE;
63
64   ////////////////// Listener registration //////////////////
65

66   // Session Listeners
67

68     Vector sessionListeners = new Vector();
69
70     public void addSessionListener(SessionListener listener) {
71     sessionListeners.add(listener);
72     }
73
74     public void removeSessionListener(SessionListener listener) {
75     sessionListeners.remove(listener);
76     }
77
78   // Spec Listeners
79

80   Vector specListeners = new Vector();
81
82     public void addSpecListener(SpecListener cl) {
83     specListeners.add(cl);
84     }
85
86     public void removeSpecListener(SpecListener cl) {
87     specListeners.remove(cl);
88     }
89
90     // JDI Listeners
91

92     Vector jdiListeners = new Vector();
93
94     /**
95      * Adds a JDIListener
96      */

97     public void addJDIListener(JDIListener jl) {
98         jdiListeners.add(jl);
99     }
100     
101     /**
102      * Adds a JDIListener - at the specified position
103      */

104     public void addJDIListener(int index, JDIListener jl) {
105         jdiListeners.add(index, jl);
106     }
107     
108     /**
109      * Removes a JDIListener
110      */

111     public void removeJDIListener(JDIListener jl) {
112         jdiListeners.remove(jl);
113     }
114
115   // App Echo Listeners
116

117     private Vector appEchoListeners = new Vector();
118
119     public void addApplicationEchoListener(OutputListener l) {
120     appEchoListeners.addElement(l);
121     }
122
123     public void removeApplicationEchoListener(OutputListener l) {
124     appEchoListeners.removeElement(l);
125     }
126
127   // App Output Listeners
128

129     private Vector appOutputListeners = new Vector();
130
131     public void addApplicationOutputListener(OutputListener l) {
132     appOutputListeners.addElement(l);
133     }
134
135     public void removeApplicationOutputListener(OutputListener l) {
136     appOutputListeners.removeElement(l);
137     }
138
139   // App Error Listeners
140

141     private Vector appErrorListeners = new Vector();
142
143     public void addApplicationErrorListener(OutputListener l) {
144     appErrorListeners.addElement(l);
145     }
146
147     public void removeApplicationErrorListener(OutputListener l) {
148     appErrorListeners.removeElement(l);
149     }
150
151   // Diagnostic Listeners
152

153     private Vector diagnosticsListeners = new Vector();
154
155     public void addDiagnosticsListener(OutputListener l) {
156     diagnosticsListeners.addElement(l);
157     }
158
159     public void removeDiagnosticsListener(OutputListener l) {
160     diagnosticsListeners.removeElement(l);
161     }
162
163   /////////// End Listener Registration //////////////
164

165     //### We probably don't want this public
166
public VirtualMachine vm() {
167         return session == null ? null : session.vm;
168     }
169
170     void ensureActiveSession() throws NoSessionException {
171     if (session == null) throw new NoSessionException();
172     }
173
174     public EventRequestManager eventRequestManager() {
175         return vm() == null ? null : vm().eventRequestManager();
176     }
177
178     /**
179      * Get JDI trace mode.
180      */

181     public int getTraceMode(int mode) {
182     return traceMode;
183     }
184
185     /**
186      * Set JDI trace mode.
187      */

188     public void setTraceMode(int mode) {
189     traceMode = mode;
190     if (session != null) {
191         session.setTraceMode(mode);
192     }
193     }
194
195     /**
196      * Determine if VM is interrupted, i.e, present and not running.
197      */

198     public boolean isInterrupted() /* should: throws NoSessionException */ {
199 // ensureActiveSession();
200
return session.interrupted;
201     }
202     
203     /**
204      * Return a list of ReferenceType objects for all
205      * currently loaded classes and interfaces.
206      * Array types are not returned.
207      */

208     public List allClasses() throws NoSessionException {
209     ensureActiveSession();
210     return vm().allClasses();
211     }
212     
213     /**
214      * Return a ReferenceType object for the currently
215      * loaded class or interface whose fully-qualified
216      * class name is specified, else return null if there
217      * is none.
218      *
219      * In general, we must return a list of types, because
220      * multiple class loaders could have loaded a class
221      * with the same fully-qualified name.
222      */

223     public List findClassesByName(String JavaDoc name) throws NoSessionException {
224     ensureActiveSession();
225     return vm().classesByName(name);
226     }
227     
228     /**
229      * Return a list of ReferenceType objects for all
230      * currently loaded classes and interfaces whose name
231      * matches the given pattern. The pattern syntax is
232      * open to some future revision, but currently consists
233      * of a fully-qualified class name in which the first
234      * component may optionally be a "*" character, designating
235      * an arbitrary prefix.
236      */

237     public List findClassesMatchingPattern(String JavaDoc pattern)
238                         throws NoSessionException {
239     ensureActiveSession();
240     List result = new ArrayList(); //### Is default size OK?
241
if (pattern.startsWith("*.")) {
242         // Wildcard matches any leading package name.
243
pattern = pattern.substring(1);
244         List classes = vm().allClasses();
245         Iterator iter = classes.iterator();
246         while (iter.hasNext()) {
247         ReferenceType type = ((ReferenceType)iter.next());
248         if (type.name().endsWith(pattern)) {
249             result.add(type);
250         }
251         }
252         return result;
253     } else {
254             // It's a class name.
255
return vm().classesByName(pattern);
256     }
257     }
258
259     /*
260      * Return a list of ThreadReference objects corresponding
261      * to the threads that are currently active in the VM.
262      * A thread is removed from the list just before the
263      * thread terminates.
264      */

265
266     public List allThreads() throws NoSessionException {
267     ensureActiveSession();
268     return vm().allThreads();
269     }
270
271     /*
272      * Return a list of ThreadGroupReference objects corresponding
273      * to the top-level threadgroups that are currently active in the VM.
274      * Note that a thread group may be empty, or contain no threads as
275      * descendents.
276      */

277     
278     public List topLevelThreadGroups() throws NoSessionException {
279     ensureActiveSession();
280     return vm().topLevelThreadGroups();
281     }
282
283     /*
284      * Return the system threadgroup.
285      */

286
287     public ThreadGroupReference systemThreadGroup()
288                         throws NoSessionException {
289         ensureActiveSession();
290     return (ThreadGroupReference)vm().topLevelThreadGroups().get(0);
291     }
292
293     /*
294      * Evaluate an expression.
295      */

296
297     public Value evaluate(final StackFrame f, String JavaDoc expr)
298     throws ParseException,
299                                             InvocationException,
300                         InvalidTypeException,
301                         ClassNotLoadedException,
302                                             NoSessionException,
303                                             IncompatibleThreadStateException {
304         ExpressionParser.GetFrame frameGetter = null;
305         ensureActiveSession();
306         if (f != null) {
307             frameGetter = new ExpressionParser.GetFrame() {
308                 public StackFrame get() /* throws IncompatibleThreadStateException */ {
309                     return f;
310                 }
311             };
312         }
313         return ExpressionParser.evaluate(expr, vm(), frameGetter);
314     }
315
316
317     /*
318      * Start a new VM.
319      */

320
321     public void run(boolean suspended,
322             String JavaDoc vmArgs,
323             String JavaDoc className,
324             String JavaDoc args) throws VMLaunchFailureException {
325
326     endSession();
327
328     //### Set a breakpoint on 'main' method.
329
//### Would be cleaner if we could just bring up VM already suspended.
330
if (suspended) {
331         //### Set breakpoint at 'main(java.lang.String[])'.
332
List argList = new ArrayList(1);
333         argList.add("java.lang.String[]");
334         createMethodBreakpoint(className, "main", argList);
335     }
336     
337     String JavaDoc cmdLine = className + " " + args;
338     
339     startSession(new ChildSession(this, vmArgs, cmdLine,
340                       appInput, appOutput, appError,
341                       diagnostics));
342     }
343
344     /*
345      * Attach to an existing VM.
346      */

347     public void attach(String JavaDoc portName) throws VMLaunchFailureException {
348     endSession();
349
350     //### Changes made here for connectors have broken the
351
//### the 'Session' abstraction. The 'Session.attach()'
352
//### method is intended to encapsulate all of the various
353
//### ways in which session start-up can fail. (maddox 12/18/98)
354

355     /*
356          * Now that attaches and launches both go through Connectors,
357          * it may be worth creating a new subclass of Session for
358          * attach sessions.
359          */

360         VirtualMachineManager mgr = Bootstrap.virtualMachineManager();
361         List connectors = mgr.attachingConnectors();
362         AttachingConnector connector = (AttachingConnector)connectors.get(0);
363         Map arguments = connector.defaultArguments();
364         ((Connector.Argument)arguments.get("port")).setValue(portName);
365
366         Session newSession = internalAttach(connector, arguments);
367         if (newSession != null) {
368             startSession(newSession);
369         }
370     }
371
372     private Session internalAttach(AttachingConnector connector,
373                                    Map arguments) {
374         try {
375             VirtualMachine vm = connector.attach(arguments);
376         return new Session(vm, this, diagnostics);
377         } catch (IOException ioe) {
378             diagnostics.putString("\n Unable to attach to target VM: " +
379                                   ioe.getMessage());
380         } catch (IllegalConnectorArgumentsException icae) {
381             diagnostics.putString("\n Invalid connector arguments: " +
382                                   icae.getMessage());
383         }
384         return null;
385     }
386
387     private Session internalListen(ListeningConnector connector,
388                                    Map arguments) {
389         try {
390             VirtualMachine vm = connector.accept(arguments);
391         return new Session(vm, this, diagnostics);
392         } catch (IOException ioe) {
393             diagnostics.putString(
394                   "\n Unable to accept connection to target VM: " +
395                                   ioe.getMessage());
396         } catch (IllegalConnectorArgumentsException icae) {
397             diagnostics.putString("\n Invalid connector arguments: " +
398                                   icae.getMessage());
399         }
400         return null;
401     }
402
403     /*
404      * Connect via user specified arguments
405      * @return true on success
406      */

407     public boolean explictStart(Connector connector, Map arguments)
408                                            throws VMLaunchFailureException {
409         Session newSession = null;
410
411     endSession();
412
413         if (connector instanceof LaunchingConnector) {
414             // we were launched, use ChildSession
415
newSession = new ChildSession(this, (LaunchingConnector)connector,
416                                           arguments,
417                                           appInput, appOutput, appError,
418                                           diagnostics);
419         } else if (connector instanceof AttachingConnector) {
420             newSession = internalAttach((AttachingConnector)connector,
421                                         arguments);
422         } else if (connector instanceof ListeningConnector) {
423             newSession = internalListen((ListeningConnector)connector,
424                                         arguments);
425         } else {
426             diagnostics.putString("\n Unknown connector: " + connector);
427         }
428         if (newSession != null) {
429             startSession(newSession);
430         }
431         return newSession != null;
432     }
433
434     /*
435      * Detach from VM. If VM was started by debugger, terminate it.
436      */

437     public void detach() throws NoSessionException {
438     ensureActiveSession();
439     endSession();
440     }
441
442     private void startSession(Session s) throws VMLaunchFailureException {
443     if (!s.attach()) {
444         throw new VMLaunchFailureException();
445     }
446     session = s;
447     EventRequestManager em = vm().eventRequestManager();
448     ClassPrepareRequest classPrepareRequest = em.createClassPrepareRequest();
449     //### We must allow the deferred breakpoints to be resolved before
450
//### we continue executing the class. We could optimize if there
451
//### were no deferred breakpoints outstanding for a particular class.
452
//### Can we do this with JDI?
453
classPrepareRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL);
454     classPrepareRequest.enable();
455     ClassUnloadRequest classUnloadRequest = em.createClassUnloadRequest();
456     classUnloadRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
457     classUnloadRequest.enable();
458     ThreadStartRequest threadStartRequest = em.createThreadStartRequest();
459     threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
460     threadStartRequest.enable();
461     ThreadDeathRequest threadDeathRequest = em.createThreadDeathRequest();
462     threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
463     threadDeathRequest.enable();
464     ExceptionRequest exceptionRequest =
465                     em.createExceptionRequest(null, false, true);
466     exceptionRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL);
467     exceptionRequest.enable();
468     validateThreadInfo();
469     session.interrupted = true;
470     notifySessionStart();
471     }
472
473     void endSession() {
474     if (session != null) {
475         session.detach();
476         session = null;
477         invalidateThreadInfo();
478         notifySessionDeath();
479     }
480     }
481
482     /*
483      * Suspend all VM activity.
484      */

485
486     public void interrupt() throws NoSessionException {
487     ensureActiveSession();
488     vm().suspend();
489     //### Is it guaranteed that the interrupt has happened?
490
validateThreadInfo();
491     session.interrupted = true;
492     notifyInterrupted();
493     }
494
495     /*
496      * Resume interrupted VM.
497      */

498
499     public void go() throws NoSessionException, VMNotInterruptedException {
500     ensureActiveSession();
501     invalidateThreadInfo();
502     session.interrupted = false;
503     notifyContinued();
504     vm().resume();
505     }
506
507     /*
508      * Stepping.
509      */

510     void clearPreviousStep(ThreadReference thread) {
511         /*
512          * A previous step may not have completed on this thread;
513          * if so, it gets removed here.
514          */

515          EventRequestManager mgr = vm().eventRequestManager();
516          List requests = mgr.stepRequests();
517          Iterator iter = requests.iterator();
518          while (iter.hasNext()) {
519              StepRequest request = (StepRequest)iter.next();
520              if (request.thread().equals(thread)) {
521                  mgr.deleteEventRequest(request);
522                  break;
523              }
524          }
525     }
526
527     private void generalStep(ThreadReference thread, int size, int depth)
528             throws NoSessionException {
529     ensureActiveSession();
530     invalidateThreadInfo();
531     session.interrupted = false;
532     notifyContinued();
533
534         clearPreviousStep(thread);
535         EventRequestManager reqMgr = vm().eventRequestManager();
536         StepRequest request = reqMgr.createStepRequest(thread,
537                                                        size, depth);
538         // We want just the next step event and no others
539
request.addCountFilter(1);
540         request.enable();
541         vm().resume();
542     }
543
544     public void stepIntoInstruction(ThreadReference thread)
545             throws NoSessionException {
546     generalStep(thread, StepRequest.STEP_MIN, StepRequest.STEP_INTO);
547     }
548
549     public void stepOverInstruction(ThreadReference thread)
550             throws NoSessionException {
551     generalStep(thread, StepRequest.STEP_MIN, StepRequest.STEP_OVER);
552     }
553
554     public void stepIntoLine(ThreadReference thread)
555             throws NoSessionException,
556             AbsentInformationException {
557     generalStep(thread, StepRequest.STEP_LINE, StepRequest.STEP_INTO);
558     }
559
560     public void stepOverLine(ThreadReference thread)
561             throws NoSessionException,
562             AbsentInformationException {
563     generalStep(thread, StepRequest.STEP_LINE, StepRequest.STEP_OVER);
564     }
565
566     public void stepOut(ThreadReference thread)
567             throws NoSessionException {
568     generalStep(thread, StepRequest.STEP_MIN, StepRequest.STEP_OUT);
569     }
570
571     /*
572      * Thread control.
573      */

574
575     public void suspendThread(ThreadReference thread) throws NoSessionException {
576     ensureActiveSession();
577     thread.suspend();
578     }
579
580     public void resumeThread(ThreadReference thread) throws NoSessionException {
581     ensureActiveSession();
582     thread.resume();
583     }
584
585     public void stopThread(ThreadReference thread) throws NoSessionException {
586     ensureActiveSession();
587     //### Need an exception now. Which one to use?
588
//thread.stop();
589
}
590
591     /*
592      * ThreadInfo objects -- Allow query of thread status and stack.
593      */

594
595     private List threadInfoList = new LinkedList();
596     //### Should be weak! (in the value, not the key)
597
private HashMap threadInfoMap = new HashMap();
598
599     public ThreadInfo threadInfo(ThreadReference thread) {
600         if (session == null || thread == null) {
601             return null;
602         }
603     ThreadInfo info = (ThreadInfo)threadInfoMap.get(thread);
604     if (info == null) {
605         //### Should not hardcode initial frame count and prefetch here!
606
//info = new ThreadInfo(thread, 10, 10);
607
info = new ThreadInfo(thread);
608         if (session.interrupted) {
609         info.validate();
610         }
611         threadInfoList.add(info);
612         threadInfoMap.put(thread, info);
613     }
614     return info;
615     }
616
617      void validateThreadInfo() {
618     session.interrupted = true;
619     Iterator iter = threadInfoList.iterator();
620         while (iter.hasNext()) {
621         ((ThreadInfo)iter.next()).validate();
622         }
623     }
624
625     private void invalidateThreadInfo() {
626         if (session != null) {
627             session.interrupted = false;
628             Iterator iter = threadInfoList.iterator();
629             while (iter.hasNext()) {
630                 ((ThreadInfo)iter.next()).invalidate();
631             }
632         }
633     }
634
635     void removeThreadInfo(ThreadReference thread) {
636     ThreadInfo info = (ThreadInfo)threadInfoMap.get(thread);
637     if (info != null) {
638         info.invalidate();
639         threadInfoMap.remove(thread);
640         threadInfoList.remove(info);
641     }
642     }
643
644     /*
645      * Listen for Session control events.
646      */

647
648     private void notifyInterrupted() {
649     Vector l = (Vector)sessionListeners.clone();
650     EventObject evt = new EventObject(this);
651     for (int i = 0; i < l.size(); i++) {
652         ((SessionListener)l.elementAt(i)).sessionInterrupt(evt);
653     }
654     }
655
656     private void notifyContinued() {
657     Vector l = (Vector)sessionListeners.clone();
658     EventObject evt = new EventObject(this);
659     for (int i = 0; i < l.size(); i++) {
660         ((SessionListener)l.elementAt(i)).sessionContinue(evt);
661     }
662     }
663
664     private void notifySessionStart() {
665     Vector l = (Vector)sessionListeners.clone();
666     EventObject evt = new EventObject(this);
667     for (int i = 0; i < l.size(); i++) {
668         ((SessionListener)l.elementAt(i)).sessionStart(evt);
669     }
670     }
671
672     private void notifySessionDeath() {
673 /*** noop for now
674     Vector l = (Vector)sessionListeners.clone();
675     EventObject evt = new EventObject(this);
676     for (int i = 0; i < l.size(); i++) {
677         ((SessionListener)l.elementAt(i)).sessionDeath(evt);
678     }
679 ****/

680     }
681
682     /*
683      * Listen for input and output requests from the application
684      * being debugged. These are generated only when the debuggee
685      * is spawned as a child of the debugger.
686      */

687
688     private Object JavaDoc inputLock = new Object JavaDoc();
689     private LinkedList inputBuffer = new LinkedList();
690
691     private void resetInputBuffer() {
692     synchronized (inputLock) {
693         inputBuffer = new LinkedList();
694     }
695     }
696
697     public void sendLineToApplication(String JavaDoc line) {
698     synchronized (inputLock) {
699         inputBuffer.addFirst(line);
700         inputLock.notifyAll();
701     }
702     }
703
704     private InputListener appInput = new InputListener() {
705     public String JavaDoc getLine() {
706         // Don't allow reader to be interrupted -- catch and retry.
707
String JavaDoc line = null;
708         while (line == null) {
709         synchronized (inputLock) {
710             try {
711             while (inputBuffer.size() < 1) {
712                 inputLock.wait();
713             }
714             line = (String JavaDoc)inputBuffer.removeLast();
715             } catch (InterruptedException JavaDoc e) {}
716         }
717         }
718         // We must not be holding inputLock here, as the listener
719
// that we call to echo a line might call us re-entrantly
720
// to provide another line of input.
721
// Run in Swing event dispatcher thread.
722
final String JavaDoc input = line;
723         SwingUtilities.invokeLater(new Runnable JavaDoc() {
724         public void run() {
725             echoInputLine(input);
726         }
727         });
728         return line;
729     }
730     };
731
732     private static String JavaDoc newline = System.getProperty("line.separator");
733
734     private void echoInputLine(String JavaDoc line) {
735     Vector l = (Vector)appEchoListeners.clone();
736     for (int i = 0; i < l.size(); i++) {
737         OutputListener ol = (OutputListener)l.elementAt(i);
738         ol.putString(line);
739         ol.putString(newline);
740     }
741     }
742     
743     private OutputListener appOutput = new OutputListener() {
744     public void putString(String JavaDoc string) {
745         Vector l = (Vector)appOutputListeners.clone();
746         for (int i = 0; i < l.size(); i++) {
747         ((OutputListener)l.elementAt(i)).putString(string);
748         }
749     }
750     };
751
752     private OutputListener appError = new OutputListener() {
753     public void putString(String JavaDoc string) {
754         Vector l = (Vector)appErrorListeners.clone();
755         for (int i = 0; i < l.size(); i++) {
756         ((OutputListener)l.elementAt(i)).putString(string);
757         }
758     }
759     };
760
761    private OutputListener diagnostics = new OutputListener() {
762     public void putString(String JavaDoc string) {
763         Vector l = (Vector)diagnosticsListeners.clone();
764         for (int i = 0; i < l.size(); i++) {
765         ((OutputListener)l.elementAt(i)).putString(string);
766         }
767     }
768    };
769
770   ///////////// Spec Request Creation/Deletion/Query ///////////
771

772     private EventRequestSpecList specList = new EventRequestSpecList(this);
773
774     public BreakpointSpec
775     createSourceLineBreakpoint(String JavaDoc sourceName, int line) {
776         return specList.createSourceLineBreakpoint(sourceName, line);
777     }
778         
779     public BreakpointSpec
780     createClassLineBreakpoint(String JavaDoc classPattern, int line) {
781         return specList.createClassLineBreakpoint(classPattern, line);
782     }
783         
784     public BreakpointSpec
785     createMethodBreakpoint(String JavaDoc classPattern,
786                            String JavaDoc methodId, List methodArgs) {
787         return specList.createMethodBreakpoint(classPattern,
788                          methodId, methodArgs);
789     }
790         
791     public ExceptionSpec
792     createExceptionIntercept(String JavaDoc classPattern,
793                              boolean notifyCaught,
794                              boolean notifyUncaught) {
795         return specList.createExceptionIntercept(classPattern,
796                            notifyCaught,
797                            notifyUncaught);
798     }
799         
800     public AccessWatchpointSpec
801     createAccessWatchpoint(String JavaDoc classPattern, String JavaDoc fieldId) {
802         return specList.createAccessWatchpoint(classPattern, fieldId);
803     }
804         
805     public ModificationWatchpointSpec
806     createModificationWatchpoint(String JavaDoc classPattern, String JavaDoc fieldId) {
807         return specList.createModificationWatchpoint(classPattern,
808                                fieldId);
809     }
810
811     public void delete(EventRequestSpec spec) {
812         specList.delete(spec);
813     }
814
815     void resolve(ReferenceType refType) {
816         specList.resolve(refType);
817     }
818
819     public void install(EventRequestSpec spec) {
820         specList.install(spec, vm());
821     }
822  
823     public List eventRequestSpecs() {
824         return specList.eventRequestSpecs();
825     }
826 }
827
Popular Tags