Package javassist.bytecode
Class StackMapTable
java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.StackMapTable
stack_map attribute.
This is an entry in the attributes table of a Code attribute. It was introduced by J2SE 6 for the verification by typechecking.
- Since:
- 3.4
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn exception that may be thrown bycopy()inStackMapTable.static classA code walker for a StackMapTable attribute.static classA writer of stack map tables. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDouble_variable_info.tag.static final intFloat_variable_info.tag.static final intInteger_variable_info.tag.static final intLong_variable_info.tag.static final intNull_variable_info.tag.static final intObject_variable_info.tag.static final StringThe name of this attribute"StackMapTable".static final intUninitializedThis_variable_info.tag.static final intTop_variable_info.tag.static final intUninitialized_variable_info.tag. -
Method Summary
Modifier and TypeMethodDescriptionMakes a copy.voidinsertLocal(int index, int tag, int classInfo) Updates this stack map table when a new local variable is inserted for a new parameter.voidprintln(PrintStream ps) Prints the stack table map.voidPrints the stack table map.voidremoveNew(int where) Undocumented method.static inttypeTagOf(char descriptor) Returns the tag of the type specified by the descriptor.Methods inherited from class javassist.bytecode.AttributeInfo
get, getConstPool, getName, length, set
-
Field Details
-
tag
The name of this attribute"StackMapTable".- See Also:
-
TOP
public static final int TOPTop_variable_info.tag.- See Also:
-
INTEGER
public static final int INTEGERInteger_variable_info.tag.- See Also:
-
FLOAT
public static final int FLOATFloat_variable_info.tag.- See Also:
-
DOUBLE
public static final int DOUBLEDouble_variable_info.tag.- See Also:
-
LONG
public static final int LONGLong_variable_info.tag.- See Also:
-
NULL
public static final int NULLNull_variable_info.tag.- See Also:
-
THIS
public static final int THISUninitializedThis_variable_info.tag.- See Also:
-
OBJECT
public static final int OBJECTObject_variable_info.tag.- See Also:
-
UNINIT
public static final int UNINITUninitialized_variable_info.tag.- See Also:
-
-
Method Details
-
copy
public AttributeInfo copy(ConstPool newCp, Map<String, String> classnames) throws StackMapTable.RuntimeCopyExceptionMakes a copy.- Overrides:
copyin classAttributeInfo- Parameters:
newCp- the constant pool table used by the new copy.classnames- pairs of replaced and substituted class names.- Throws:
StackMapTable.RuntimeCopyException- if aBadBytecodeexception is thrown while copying, it is converted intoRuntimeCopyException.
-
insertLocal
Updates this stack map table when a new local variable is inserted for a new parameter.- Parameters:
index- the index of the added local variable.tag- the type tag of that local variable.classInfo- the index of theCONSTANT_Class_infostructure in a constant pool table. This should be zero unless the tag isITEM_Object.- Throws:
BadBytecode- See Also:
-
typeTagOf
public static int typeTagOf(char descriptor) Returns the tag of the type specified by the descriptor. This method returnsINTEGERunless the descriptor is either D (double), F (float), J (long), L (class type), or [ (array).- Parameters:
descriptor- the type descriptor.- See Also:
-
println
Prints the stack table map. -
println
Prints the stack table map.- Parameters:
ps- a print stream such asSystem.out.
-
removeNew
Undocumented method. Do not use; internal-use only.This method is for javassist.convert.TransformNew. It is called to update the stack map table when the NEW opcode (and the following DUP) is removed.
- Parameters:
where- the position of the removed NEW opcode.- Throws:
CannotCompileException
-