Package com.tonic.parser.attribute.stack
Class StackMapFrame
- java.lang.Object
-
- com.tonic.parser.attribute.stack.StackMapFrame
-
- Direct Known Subclasses:
AppendFrame,ChopFrame,FullFrame,SameFrame,SameFrameExtended,SameLocals1StackItemFrame,SameLocals1StackItemFrameExtended
public abstract class StackMapFrame extends Object
Base class for stack map frames in the StackMapTable attribute.
-
-
Constructor Summary
Constructors Constructor Description StackMapFrame(int frameType)Constructs a StackMapFrame with the specified frame type.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetFrameType()abstract intgetLength()Returns the total length of this frame in bytes.abstract intgetOffsetDelta()static StackMapFramereadFrame(ClassFile classFile, ConstPool constPool)Reads a stack map frame from the class file.StringtoString()voidwrite(DataOutputStream dos)Writes this stack map frame to the output stream.
-
-
-
Method Detail
-
getFrameType
public int getFrameType()
- Returns:
- the frame type
-
readFrame
public static StackMapFrame readFrame(ClassFile classFile, ConstPool constPool)
Reads a stack map frame from the class file.- Parameters:
classFile- the class file to read fromconstPool- the constant pool for resolving references- Returns:
- the parsed StackMapFrame
-
write
public final void write(DataOutputStream dos) throws IOException
Writes this stack map frame to the output stream.- Parameters:
dos- the output stream to write to- Throws:
IOException- if an I/O error occurs
-
getLength
public abstract int getLength()
Returns the total length of this frame in bytes.- Returns:
- the length in bytes
-
getOffsetDelta
public abstract int getOffsetDelta()
- Returns:
- the bytecode offset delta from the previous frame
-
-