KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdi > internal > request > StepRequestImpl


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.internal.request;
12
13
14 import org.eclipse.jdi.internal.VirtualMachineImpl;
15 import org.eclipse.jdi.internal.event.StepEventImpl;
16
17 import com.sun.jdi.ThreadReference;
18 import com.sun.jdi.request.StepRequest;
19
20 /**
21  * this class implements the corresponding interfaces
22  * declared by the JDI specification. See the com.sun.jdi package
23  * for more information.
24  *
25  */

26 public class StepRequestImpl extends EventRequestImpl implements StepRequest {
27     /**
28      * Creates new StepRequest.
29      */

30     public StepRequestImpl(VirtualMachineImpl vmImpl) {
31         super("StepRequest", vmImpl); //$NON-NLS-1$
32
}
33
34     /**
35      * Creates new StepRequest, used by subclasses.
36      */

37     protected StepRequestImpl(String JavaDoc description, VirtualMachineImpl vmImpl) {
38         super(description, vmImpl);
39     }
40
41     /**
42      * @return Returns the relative call stack limit.
43      */

44     public int depth() {
45         return ((EventRequestImpl.ThreadStepFilter)fThreadStepFilters.get(0)).fThreadStepDepth;
46     }
47     
48     /**
49      * @return Returns the size of each step.
50      */

51     public int size() {
52         return ((EventRequestImpl.ThreadStepFilter)fThreadStepFilters.get(0)).fThreadStepSize;
53     }
54     
55     /**
56      * @return Returns ThreadReference of thread in which to step.
57      */

58     public ThreadReference thread() {
59         return ((EventRequestImpl.ThreadStepFilter)fThreadStepFilters.get(0)).fThread;
60     }
61
62     /**
63      * @return Returns JDWP EventKind.
64      */

65     protected final byte eventKind() {
66         return StepEventImpl.EVENT_KIND;
67     }
68 }
69
Popular Tags