001: /*******************************************************************************
002: * Copyright (c) 2000, 2005 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jdt.core.util;
011:
012: /**
013: * Description of a stack map frame as specified in the JVM specifications.
014: *
015: * This interface may be implemented by clients.
016: *
017: * @since 3.2
018: */
019: public interface IStackMapFrame {
020:
021: /**
022: * Answer back the frame type for this entry.
023: * <table>
024: * <tr>
025: * <th align="left">Type</th>
026: * <th align="left">Range</th>
027: * </tr>
028: * <tr>
029: * <td>SAME</td>
030: * <td>0-63</td>
031: * </tr>
032: * <tr>
033: * <td>SAME_LOCALS_1_STACK_ITEM</td>
034: * <td>64-127</td>
035: * </tr>
036: * <tr>
037: * <td>SAME_LOCALS_1_STACK_ITEM_EXTENDED</td>
038: * <td>247</td>
039: * </tr>
040: * <tr>
041: * <td>CHOP</td>
042: * <td>248-250</td>
043: * </tr>
044: * <tr>
045: * <td>SAME_FRAME_EXTENDED</td>
046: * <td>251</td>
047: * </tr>
048: * <tr>
049: * <td>APPEND</td>
050: * <td>252-254</td>
051: * </tr>
052: * <tr>
053: * <td>FULL_FRAME</td>
054: * <td>255</td>
055: * </tr>
056: * </table>
057: *
058: * @return the frame type for this entry
059: */
060: int getFrameType();
061:
062: /**
063: * Answer back the offset delta.
064: * <p>This is not defined only for the frame types SAME and SAME_LOCALS_1_STACK_ITEM.</p>
065: *
066: * @return the offset delta
067: */
068: int getOffsetDelta();
069:
070: /**
071: * Answer back the number of locals.
072: * <p>This is defined only for the frame type FULL_FRAME.</p>
073: *
074: * @return the number of locals
075: */
076: int getNumberOfLocals();
077:
078: /**
079: * Answer back verification infos for the defined locals.
080: * <p>This is defined only for frame types APPEND and FULL_FRAME.
081: *
082: * @return verification infos for the defined locals
083: */
084: IVerificationTypeInfo[] getLocals();
085:
086: /**
087: * Answer back the number of stack items
088: * <p>This is defined only for the frame types SAME_LOCALS_1_STACK_ITEM, SAME_LOCALS_1_STACK_ITEM_EXTENDED and FULL_FRAME.
089: * For SAME_LOCALS_1_STACK_ITEM and SAME_LOCALS_1_STACK_ITEM_EXTENDED, the answer is implicitely 1.</p>
090: *
091: * @return the number of stack items
092: */
093: int getNumberOfStackItems();
094:
095: /**
096: * Answer back the verification infos for the stack items.
097: *
098: * @return the verification infos for the stack items
099: */
100: IVerificationTypeInfo[] getStackItems();
101: }
|