public class TypedBlock extends BasicBlock
Modifier and Type | Class and Description |
---|---|
static class |
TypedBlock.Maker |
BasicBlock.Catch, BasicBlock.JsrBytecode, BasicBlock.Mark
Modifier and Type | Field and Description |
---|---|
TypeData[] |
localsTypes |
int |
numLocals |
int |
stackTop |
TypeData[] |
stackTypes |
Modifier | Constructor and Description |
---|---|
protected |
TypedBlock(int pos) |
Modifier and Type | Method and Description |
---|---|
boolean |
alreadySet() |
private static int |
descToTag(java.lang.String desc,
int i,
int n,
TypeData[] types) |
static java.lang.String |
getRetType(java.lang.String desc) |
(package private) void |
initFirstBlock(int maxStack,
int maxLocals,
java.lang.String className,
java.lang.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(java.lang.StringBuffer sbuf,
int size,
TypeData[] types) |
void |
resetNumLocals() |
void |
setStackMap(int st,
TypeData[] stack,
int nl,
TypeData[] locals) |
private static TypeData |
toPrimitiveTag(char c) |
protected void |
toString2(java.lang.StringBuffer sbuf) |
find, toString
public int stackTop
public int numLocals
public TypeData[] localsTypes
public TypeData[] stackTypes
public static TypedBlock[] makeBlocks(MethodInfo minfo, CodeAttribute ca, boolean optimize) throws BadBytecode
optmize
- if it is true and the method does not include
branches, this method returns null.BadBytecode
protected void toString2(java.lang.StringBuffer sbuf)
toString2
in class BasicBlock
private void printTypes(java.lang.StringBuffer sbuf, int size, TypeData[] types)
public boolean alreadySet()
public void setStackMap(int st, TypeData[] stack, int nl, TypeData[] locals) throws BadBytecode
BadBytecode
public void resetNumLocals()
void initFirstBlock(int maxStack, int maxLocals, java.lang.String className, java.lang.String methodDesc, boolean isStatic, boolean isConstructor) throws BadBytecode
block
- the first basic block that this method initializes.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.BadBytecode
private static int descToTag(java.lang.String desc, int i, int n, TypeData[] types) throws BadBytecode
BadBytecode
private static TypeData toPrimitiveTag(char c)
public static java.lang.String getRetType(java.lang.String desc)