Package javassist.bytecode
Class StackMapTable.Writer
- java.lang.Object
-
- javassist.bytecode.StackMapTable.Writer
-
- Enclosing class:
- StackMapTable
public static class StackMapTable.Writer extends Object
A writer of stack map tables.
-
-
Constructor Summary
Constructors Constructor Description Writer(int size)Constructs a writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendFrame(int offsetDelta, int[] tags, int[] data)Writes aappend_frame.voidchopFrame(int offsetDelta, int k)Writes achop_frame.voidfullFrame(int offsetDelta, int[] localTags, int[] localData, int[] stackTags, int[] stackData)Writes afull_frame.voidsameFrame(int offsetDelta)Writes asame_frameor asame_frame_extended.voidsameLocals(int offsetDelta, int tag, int data)Writes asame_locals_1_stack_itemor asame_locals_1_stack_item_extended.byte[]toByteArray()Returns the stack map table written out.StackMapTabletoStackMapTable(ConstPool cp)Constructs and a return a stack map table containing the written stack map entries.
-
-
-
Method Detail
-
toByteArray
public byte[] toByteArray()
Returns the stack map table written out.
-
toStackMapTable
public StackMapTable toStackMapTable(ConstPool cp)
Constructs and a return a stack map table containing the written stack map entries.- Parameters:
cp- the constant pool used to write the stack map entries.
-
sameFrame
public void sameFrame(int offsetDelta)
Writes asame_frameor asame_frame_extended.
-
sameLocals
public void sameLocals(int offsetDelta, int tag, int data)Writes asame_locals_1_stack_itemor asame_locals_1_stack_item_extended.- Parameters:
tag-stack[0].tag.data-stack[0].cpool_indexif the tag isOBJECT, orstack[0].offsetif the tag isUNINIT. Otherwise, this parameter is not used.
-
chopFrame
public void chopFrame(int offsetDelta, int k)Writes achop_frame.- Parameters:
k- the number of absent locals. 1, 2, or 3.
-
appendFrame
public void appendFrame(int offsetDelta, int[] tags, int[] data)Writes aappend_frame. The number of the appended locals is specified by the length oftags.- Parameters:
tags-locals[].tag. The length of this array must be either 1, 2, or 3.data-locals[].cpool_indexif the tag isOBJECT, orlocals[].offsetif the tag isUNINIT. Otherwise, this parameter is not used.
-
fullFrame
public void fullFrame(int offsetDelta, int[] localTags, int[] localData, int[] stackTags, int[] stackData)Writes afull_frame.number_of_localsandnumber_of_stack_itemsare specified by the the length oflocalTagsandstackTags.- Parameters:
localTags-locals[].tag.localData-locals[].cpool_indexif the tag isOBJECT, orlocals[].offsetif the tag isUNINIT. Otherwise, this parameter is not used.stackTags-stack[].tag.stackData-stack[].cpool_indexif the tag isOBJECT, orstack[].offsetif the tag isUNINIT. Otherwise, this parameter is not used.
-
-