public class AsmOpUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static com.alibaba.deps.org.objectweb.asm.Type |
CLASS_TYPE |
static com.alibaba.deps.org.objectweb.asm.Type |
OBJECT_ARRAY_TYPE |
static com.alibaba.deps.org.objectweb.asm.Type |
OBJECT_TYPE |
static com.alibaba.deps.org.objectweb.asm.Type |
STRING_ARRAY_TYPE |
static com.alibaba.deps.org.objectweb.asm.Type |
STRING_TYPE |
| Constructor and Description |
|---|
AsmOpUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
arrayLoad(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type) |
static void |
arrayStore(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type) |
static void |
box(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type) |
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.
|
static void |
dup(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) |
static void |
dup2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) |
static void |
dup2X1(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
Generates a DUP2_X1 instruction.
|
static void |
dup2X2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
Generates a DUP2_X2 instruction.
|
static void |
dupX1(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) |
static void |
dupX2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) |
static com.alibaba.deps.org.objectweb.asm.Type |
getBoxedType(com.alibaba.deps.org.objectweb.asm.Type type) |
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.
|
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) |
static com.alibaba.deps.org.objectweb.asm.commons.Method |
getUnBoxMethod(com.alibaba.deps.org.objectweb.asm.Type type) |
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) |
static boolean |
isBoxType(com.alibaba.deps.org.objectweb.asm.Type type) |
static boolean |
isReturnCode(int opcode) |
static void |
ldc(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList,
Object value) |
static void |
loadArg(boolean staticAccess,
com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type[] argumentTypes,
int i) |
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.
|
static void |
loadArgs(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.tree.MethodNode methodNode) |
static void |
loadThis(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions)
Generates the instruction to load 'this' on the stack.
|
static void |
loadVar(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type,
int index) |
static boolean |
needBox(com.alibaba.deps.org.objectweb.asm.Type type) |
static void |
newArray(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList,
com.alibaba.deps.org.objectweb.asm.Type type) |
static void |
newInstance(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type) |
static void |
pop(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) |
static void |
pop2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
Generates a POP2 instruction.
|
static void |
push(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList,
int value) |
static void |
push(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList,
String value) |
static void |
pushNUll(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) |
static void |
storeVar(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type,
int index) |
static void |
swap(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList) |
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.
|
static void |
throwException(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions) |
static void |
unbox(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) |
public static final com.alibaba.deps.org.objectweb.asm.Type OBJECT_TYPE
public static final com.alibaba.deps.org.objectweb.asm.Type CLASS_TYPE
public static final com.alibaba.deps.org.objectweb.asm.Type OBJECT_ARRAY_TYPE
public static final com.alibaba.deps.org.objectweb.asm.Type STRING_TYPE
public static final com.alibaba.deps.org.objectweb.asm.Type STRING_ARRAY_TYPE
public static boolean isBoxType(com.alibaba.deps.org.objectweb.asm.Type type)
public static com.alibaba.deps.org.objectweb.asm.Type getBoxedType(com.alibaba.deps.org.objectweb.asm.Type type)
public static com.alibaba.deps.org.objectweb.asm.commons.Method getUnBoxMethod(com.alibaba.deps.org.objectweb.asm.Type type)
public static void newInstance(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type)
public static void push(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList,
int value)
public static void push(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList,
String value)
public static void pushNUll(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
public static void ldc(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList,
Object value)
value - org.objectweb.asm.tree.LdcInsnNode#cstpublic static void newArray(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList,
com.alibaba.deps.org.objectweb.asm.Type type)
public static void dup(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
public static void dup2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
public static void dupX1(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
public static void dupX2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
public static void dup2X1(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
public static void dup2X2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
public static void pop(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
public static void pop2(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
public static void swap(com.alibaba.deps.org.objectweb.asm.tree.InsnList insnList)
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)
prev - type of the top - 1 stack value.type - type of the top stack value.public static void box(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type)
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)
public static void unbox(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type)
instructions - type - org.objectweb.asm.commons.GeneratorAdapter#unbox(Type)public static boolean needBox(com.alibaba.deps.org.objectweb.asm.Type type)
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)
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)
owner - the class in which the field is defined.name - the name of the field.type - the type of the field.public static void arrayStore(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type)
public static void arrayLoad(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type)
public static void loadThis(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions)
instructions - org.objectweb.asm.commons.GeneratorAdapter#loadThis()public static void loadArgArray(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.tree.MethodNode methodNode)
org.objectweb.asm.commons.GeneratorAdapter#loadArgArray()public static void loadArgs(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.tree.MethodNode methodNode)
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)
public static void loadVar(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type,
int index)
public static void storeVar(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type,
int index)
public static void checkCast(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions,
com.alibaba.deps.org.objectweb.asm.Type type)
type - a class or interface type.public static void throwException(com.alibaba.deps.org.objectweb.asm.tree.InsnList instructions)
public static boolean isReturnCode(int opcode)
Copyright © 2018–2021. All rights reserved.