站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

StackMapFrame (Classfile Reader) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.classfile/1 1.19

org.netbeans.modules.classfile
Class StackMapFrame

java.lang.Object
  extended by org.netbeans.modules.classfile.StackMapFrame
Direct Known Subclasses:
StackMapFrame.AppendFrame, StackMapFrame.ChopFrame, StackMapFrame.FullFrame, StackMapFrame.SameFrame, StackMapFrame.SameFrameExtended, StackMapFrame.SameLocals1StackItemFrame, StackMapFrame.SameLocals1StackItemFrameExtended

public abstract class StackMapFrame
extends Object

A stack map frame, as defined by a StackMapTable attribute. A stack map frame is defined by the Java Virtual Machine Specification, section 4.8.4, as a C-like union of stack frame descriptions. To map this union to Java classes, this class is abstract and has a separate public subclass for each union member. The stack map frame type can be determined either by the its frame_type or using an instanceof test.


Nested Class Summary
static class StackMapFrame.AppendFrame
          A frame type of append_frame, which means that the operand stack is empty and the current locals are the same as the locals in the previous frame, except that k additional locals are defined.
static class StackMapFrame.ChopFrame
          A frame type of chop_frame, which means that the operand stack is empty and the current locals are the same as the locals in the previous frame, except that the k last locals are absent.
static class StackMapFrame.FullFrame
          A frame type of full_frame, which declares all of its locals and stack items.
static class StackMapFrame.SameFrame
          A frame type of same_frame, which means that the frame has exactly the same locals as the previous stack map frame and that the number of stack items is zero.
static class StackMapFrame.SameFrameExtended
          A frame type of same_frame_extended, which means the frame has exactly the same locals as the previous stack map frame and that the number of stack items is zero.
static class StackMapFrame.SameLocals1StackItemFrame
          A frame type of same_locals_1_stack_item_frame, which means that the frame has exactly the same locals as the previous stack map frame and that the number of stack items is 1.
static class StackMapFrame.SameLocals1StackItemFrameExtended
          A frame type of same_locals_1_stack_item_frame_extended, which means that the frame has exactly the same locals as the previous stack map frame and that the number of stack items is 1.
 
Method Summary
 int getFrameType()
          Returns the frame_type for this frame.
abstract  int getOffsetDelta()
          Returns the offset_delta for this frame type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFrameType

public final int getFrameType()
Returns the frame_type for this frame. As documented in the JVM specification, different tag ranges define different frame_type values.


getOffsetDelta

public abstract int getOffsetDelta()
Returns the offset_delta for this frame type. From the Java Virtual Machine Specification, section 4.8.4:

"Each stack_map_frame structure specifies the type state at a particular byte code offset. Each frame type specifies (explicitly or implicitly) a value, offset_delta, that is used to calulate the actual byte code offset at which it applies. The byte code offset at which the frame applies is given by adding 1 + offset_delta to the offset of the previous frame, unless the previous frame is the initial frame of the method, in which case the byte code offset is offset_delta."


org.netbeans.modules.classfile/1 1.19

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.