KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdi > hcr > ReenterStepRequest


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdi.hcr;
12
13
14 import com.sun.jdi.ReferenceType;
15 import com.sun.jdi.ThreadReference;
16 import com.sun.jdi.request.StepRequest;
17
18 /**
19  * A reenter step request is a step event request that will be activated when the given
20  * thread is about to pop the top stack frame. At this point, the VM is expected to do
21  * the following:
22  * <ol>
23  * <li>The arguments to the method are carefully set aside, along with the identity of the
24  * actual method.
25  * <li>The stack frame is popped. Any value being returned is discarded. Any exception being
26  * thrown is ignored. Instruction counter in caller is set <i>at</i> (rather than after) the
27  * send bytecode.
28  * <li>Suspend the thread depending on the suspend policy and report a <code>StepEvent</code>
29  * for this request.
30  * <li>When the thread is resumed, the method is re-retrieved; if the class had recently
31  * been reloaded, this must find the new bytecodes. If the method is no longer present,
32  * throw a <code>java.lang.NoSuchMethodError</code> as specified in the Java VM
33  * Specification.
34  * <li>The method is entered as per normal, using the saved arguments.
35  * </ol>
36  * <p>
37  * Note that other events may need to be reported as well (e.g., hit breakpoint on first
38  * instruction). Execution does not reenter the caller at any point; so no step out or step
39  * into events are reported.
40  *
41  */

42 public interface ReenterStepRequest extends StepRequest {
43     /**
44      * Restricts the events generated by this request to those
45      * whose location is in a class whose name does NOT match this restricted
46      * regular expression. e.g. "java.*" or "*.Foo".
47      * @param classPattern the pattern String to filter against.
48      */

49     public void addClassExclusionFilter(String JavaDoc classPattern);
50     
51     /**
52      * Restricts the events generated by this request to those
53      * whose location is in this class..
54      * @param clazz the class to filter on.
55      */

56     public void addClassFilter(ReferenceType clazz);
57     
58     /**
59      * Restricts the events generated by this request to those
60      * whose location is in a class whose name matches this restricted
61      * regular expression. e.g. "java.*" or "*.Foo".
62      * @param classPattern the pattern String to filter for.
63      */

64     public void addClassFilter(String JavaDoc classPattern);
65     
66     /**
67      * @return the thread on which the step event is being requested.
68      */

69     public ThreadReference thread();
70 }
71
Popular Tags