KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > util > IStackMapFrame


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.jdt.core.util;
12
13 /**
14  * Description of a stack map frame as specified in the JVM specifications.
15  *
16  * This interface may be implemented by clients.
17  *
18  * @since 3.2
19  */

20 public interface IStackMapFrame {
21     
22     /**
23      * Answer back the frame type for this entry.
24      * <table>
25      * <tr>
26      * <th align="left">Type</th>
27      * <th align="left">Range</th>
28      * </tr>
29      * <tr>
30      * <td>SAME</td>
31      * <td>0-63</td>
32      * </tr>
33      * <tr>
34      * <td>SAME_LOCALS_1_STACK_ITEM</td>
35      * <td>64-127</td>
36      * </tr>
37      * <tr>
38      * <td>SAME_LOCALS_1_STACK_ITEM_EXTENDED</td>
39      * <td>247</td>
40      * </tr>
41      * <tr>
42      * <td>CHOP</td>
43      * <td>248-250</td>
44      * </tr>
45      * <tr>
46      * <td>SAME_FRAME_EXTENDED</td>
47      * <td>251</td>
48      * </tr>
49      * <tr>
50      * <td>APPEND</td>
51      * <td>252-254</td>
52      * </tr>
53      * <tr>
54      * <td>FULL_FRAME</td>
55      * <td>255</td>
56      * </tr>
57      * </table>
58      *
59      * @return the frame type for this entry
60      */

61     int getFrameType();
62
63     /**
64      * Answer back the offset delta.
65      * <p>This is not defined only for the frame types SAME and SAME_LOCALS_1_STACK_ITEM.</p>
66      *
67      * @return the offset delta
68      */

69     int getOffsetDelta();
70
71     /**
72      * Answer back the number of locals.
73      * <p>This is defined only for the frame type FULL_FRAME.</p>
74      *
75      * @return the number of locals
76      */

77     int getNumberOfLocals();
78
79     /**
80      * Answer back verification infos for the defined locals.
81      * <p>This is defined only for frame types APPEND and FULL_FRAME.
82      *
83      * @return verification infos for the defined locals
84      */

85     IVerificationTypeInfo[] getLocals();
86
87     /**
88      * Answer back the number of stack items
89      * <p>This is defined only for the frame types SAME_LOCALS_1_STACK_ITEM, SAME_LOCALS_1_STACK_ITEM_EXTENDED and FULL_FRAME.
90      * For SAME_LOCALS_1_STACK_ITEM and SAME_LOCALS_1_STACK_ITEM_EXTENDED, the answer is implicitely 1.</p>
91      *
92      * @return the number of stack items
93      */

94     int getNumberOfStackItems();
95     
96     /**
97      * Answer back the verification infos for the stack items.
98      *
99      * @return the verification infos for the stack items
100      */

101     IVerificationTypeInfo[] getStackItems();
102 }
103
Popular Tags