01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdi.internal.request;
11:
12: import org.eclipse.jdi.internal.VirtualMachineImpl;
13: import org.eclipse.jdi.internal.event.StepEventImpl;
14:
15: import com.sun.jdi.ThreadReference;
16: import com.sun.jdi.request.StepRequest;
17:
18: /**
19: * this class implements the corresponding interfaces
20: * declared by the JDI specification. See the com.sun.jdi package
21: * for more information.
22: *
23: */
24: public class StepRequestImpl extends EventRequestImpl implements
25: StepRequest {
26: /**
27: * Creates new StepRequest.
28: */
29: public StepRequestImpl(VirtualMachineImpl vmImpl) {
30: super ("StepRequest", vmImpl); //$NON-NLS-1$
31: }
32:
33: /**
34: * Creates new StepRequest, used by subclasses.
35: */
36: protected StepRequestImpl(String description,
37: 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
46: .get(0)).fThreadStepDepth;
47: }
48:
49: /**
50: * @return Returns the size of each step.
51: */
52: public int size() {
53: return ((EventRequestImpl.ThreadStepFilter) fThreadStepFilters
54: .get(0)).fThreadStepSize;
55: }
56:
57: /**
58: * @return Returns ThreadReference of thread in which to step.
59: */
60: public ThreadReference thread() {
61: return ((EventRequestImpl.ThreadStepFilter) fThreadStepFilters
62: .get(0)).fThread;
63: }
64:
65: /**
66: * @return Returns JDWP EventKind.
67: */
68: protected final byte eventKind() {
69: return StepEventImpl.EVENT_KIND;
70: }
71: }
|