类 AsmOpUtils
java.lang.Object
com.alibaba.bytekit.utils.AsmOpUtils
-
字段概要
字段修饰符和类型字段说明static final com.alibaba.deps.org.objectweb.asm.Typestatic final com.alibaba.deps.org.objectweb.asm.Typestatic final com.alibaba.deps.org.objectweb.asm.Typestatic final com.alibaba.deps.org.objectweb.asm.Typestatic final com.alibaba.deps.org.objectweb.asm.Type -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidarrayLoad(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) static voidarrayStore(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) static voidbox(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) static voidcheckCast(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) Generates the instruction to check that the top stack value is of the given type.static voiddup(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) static voiddup2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) static voiddup2X1(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) Generates a DUP2_X1 instruction.static voiddup2X2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) Generates a DUP2_X2 instruction.static voiddupX1(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) static voiddupX2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) static com.alibaba.deps.org.objectweb.asm.TypegetBoxedType(com.alibaba.deps.org.objectweb.asm.Type type) static voidgetField(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, com.alibaba.deps.org.objectweb.asm.Type owner, String name, com.alibaba.deps.org.objectweb.asm.Type type) Generates the instruction to push the value of a non static field on the stack.static voidgetStatic(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, com.alibaba.deps.org.objectweb.asm.Type owner, String name, com.alibaba.deps.org.objectweb.asm.Type type) static com.alibaba.deps.org.objectweb.asm.commons.MethodgetUnBoxMethod(com.alibaba.deps.org.objectweb.asm.Type type) static voidinvokeConstructor(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type, com.alibaba.deps.org.objectweb.asm.commons.Method method) static booleanisBoxType(com.alibaba.deps.org.objectweb.asm.Type type) static booleanisReturnCode(int opcode) static voidstatic voidloadArg(boolean staticAccess, com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type[] argumentTypes, int i) static voidloadArgArray(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.tree.MethodNode methodNode) Generates the instructions to load all the method arguments on the stack, as a single object array.static voidloadArgs(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.tree.MethodNode methodNode) static voidloadThis(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions) Generates the instruction to load 'this' on the stack.static voidloadVar(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type, int index) static booleanneedBox(com.alibaba.deps.org.objectweb.asm.Type type) static voidnewArray(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, com.alibaba.deps.org.objectweb.asm.Type type) static voidnewInstance(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) static voidpop(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) static voidpop2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) Generates a POP2 instruction.static voidpush(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, int value) static voidstatic voidpushNUll(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) static voidstoreVar(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type, int index) static voidswap(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) static voidswap(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, com.alibaba.deps.org.objectweb.asm.Type prev, com.alibaba.deps.org.objectweb.asm.Type type) Generates the instructions to swap the top two stack values.static voidthrowException(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions) static voidunbox(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) static List<com.alibaba.deps.org.objectweb.asm.tree.LocalVariableNode> validVariables(List<com.alibaba.deps.org.objectweb.asm.tree.LocalVariableNode> localVariables, com.alibaba.deps.org.objectweb.asm.tree.AbstractInsnNode currentInsnNode)
-
字段详细资料
-
OBJECT_TYPE
public static final com.alibaba.deps.org.objectweb.asm.Type OBJECT_TYPE -
CLASS_TYPE
public static final com.alibaba.deps.org.objectweb.asm.Type CLASS_TYPE -
OBJECT_ARRAY_TYPE
public static final com.alibaba.deps.org.objectweb.asm.Type OBJECT_ARRAY_TYPE -
STRING_TYPE
public static final com.alibaba.deps.org.objectweb.asm.Type STRING_TYPE -
STRING_ARRAY_TYPE
public static final com.alibaba.deps.org.objectweb.asm.Type STRING_ARRAY_TYPE
-
-
构造器详细资料
-
AsmOpUtils
public AsmOpUtils()
-
-
方法详细资料
-
isBoxType
public static boolean isBoxType(com.alibaba.deps.org.objectweb.asm.Type type) -
getBoxedType
public static com.alibaba.deps.org.objectweb.asm.Type getBoxedType(com.alibaba.deps.org.objectweb.asm.Type type) -
getUnBoxMethod
public static com.alibaba.deps.org.objectweb.asm.commons.Method getUnBoxMethod(com.alibaba.deps.org.objectweb.asm.Type type) -
newInstance
public static void newInstance(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) -
push
public static void push(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, int value) -
push
-
pushNUll
public static void pushNUll(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) -
ldc
- 参数:
value-- 另请参阅:
-
newArray
public static void newArray(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, com.alibaba.deps.org.objectweb.asm.Type type) -
dup
public static void dup(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) -
dup2
public static void dup2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) -
dupX1
public static void dupX1(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) -
dupX2
public static void dupX2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) -
dup2X1
public static void dup2X1(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) Generates a DUP2_X1 instruction. -
dup2X2
public static void dup2X2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) Generates a DUP2_X2 instruction. -
pop
public static void pop(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) -
pop2
public static void pop2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) Generates a POP2 instruction. -
swap
public static void swap(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) -
swap
public static void swap(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, com.alibaba.deps.org.objectweb.asm.Type prev, com.alibaba.deps.org.objectweb.asm.Type type) Generates the instructions to swap the top two stack values.- 参数:
prev- type of the top - 1 stack value.type- type of the top stack value.
-
box
public static void box(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) -
invokeConstructor
public static void invokeConstructor(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type, com.alibaba.deps.org.objectweb.asm.commons.Method method) -
unbox
public static void unbox(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) - 参数:
instructions-type-- 另请参阅:
-
needBox
public static boolean needBox(com.alibaba.deps.org.objectweb.asm.Type type) -
getStatic
public static void getStatic(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, com.alibaba.deps.org.objectweb.asm.Type owner, String name, com.alibaba.deps.org.objectweb.asm.Type type) -
getField
public static void getField(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList, com.alibaba.deps.org.objectweb.asm.Type owner, String name, com.alibaba.deps.org.objectweb.asm.Type type) Generates the instruction to push the value of a non static field on the stack.- 参数:
owner- the class in which the field is defined.name- the name of the field.type- the type of the field.
-
arrayStore
public static void arrayStore(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) -
arrayLoad
public static void arrayLoad(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) -
loadThis
public static void loadThis(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions) Generates the instruction to load 'this' on the stack.- 参数:
instructions-- 另请参阅:
-
loadArgArray
public static void loadArgArray(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.tree.MethodNode methodNode) Generates the instructions to load all the method arguments on the stack, as a single object array.- 另请参阅:
-
loadArgs
public static void loadArgs(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.tree.MethodNode methodNode) -
loadArg
public static void loadArg(boolean staticAccess, com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type[] argumentTypes, int i) -
loadVar
public static void loadVar(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type, int index) -
storeVar
public static void storeVar(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type, int index) -
checkCast
public static void checkCast(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions, com.alibaba.deps.org.objectweb.asm.Type type) Generates the instruction to check that the top stack value is of the given type.- 参数:
type- a class or interface type.
-
throwException
public static void throwException(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions) -
isReturnCode
public static boolean isReturnCode(int opcode) -
validVariables
-