Package javassist.bytecode.stackmap
Class TypedBlock
java.lang.Object
javassist.bytecode.stackmap.BasicBlock
javassist.bytecode.stackmap.TypedBlock
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class javassist.bytecode.stackmap.BasicBlock
BasicBlock.Catch, BasicBlock.JsrBytecode, BasicBlock.Mark
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
private static int
static String
getRetType
(String desc) (package private) void
initFirstBlock
(int maxStack, int maxLocals, String className, String methodDesc, boolean isStatic, boolean isConstructor) Initializes the first block by the given method descriptor.static TypedBlock[]
makeBlocks
(MethodInfo minfo, CodeAttribute ca, boolean optimize) Divides the method body into basic blocks.private void
printTypes
(StringBuilder sbuf, int size, TypeData[] types) void
void
setStackMap
(int st, TypeData[] stack, int nl, TypeData[] locals) private static TypeData
toPrimitiveTag
(char c) protected void
toString2
(StringBuilder sbuf) Methods inherited from class javassist.bytecode.stackmap.BasicBlock
find, toString
-
Field Details
-
stackTop
public int stackTop -
numLocals
public int numLocals -
localsTypes
-
stackTypes
-
-
Constructor Details
-
TypedBlock
protected TypedBlock(int pos)
-
-
Method Details
-
makeBlocks
public static TypedBlock[] makeBlocks(MethodInfo minfo, CodeAttribute ca, boolean optimize) throws BadBytecode Divides the method body into basic blocks. The type information of the first block is initialized.- Parameters:
optimize
- if it is true and the method does not include branches, this method returns null.- Throws:
BadBytecode
-
toString2
- Overrides:
toString2
in classBasicBlock
-
printTypes
-
alreadySet
public boolean alreadySet() -
setStackMap
- Throws:
BadBytecode
-
resetNumLocals
public void resetNumLocals() -
initFirstBlock
void initFirstBlock(int maxStack, int maxLocals, String className, String methodDesc, boolean isStatic, boolean isConstructor) throws BadBytecode Initializes the first block by the given method descriptor.- Parameters:
className
- a dot-separated fully qualified class name. For example,javassist.bytecode.stackmap.BasicBlock
.methodDesc
- method descriptor.isStatic
- true if the method is a static method.isConstructor
- true if the method is a constructor.block
- the first basic block that this method initializes.- Throws:
BadBytecode
-
descToTag
- Throws:
BadBytecode
-
toPrimitiveTag
-
getRetType
-