public class AsmUtils
extends java.lang.Object
| Constructor and Description |
|---|
AsmUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.reflect.Field |
changeFieldAccess(java.lang.Class clazz,
java.lang.String fieldName)
Changes the access level for the specified field for a class.
|
static java.lang.reflect.Field |
changeFieldAccess(java.lang.Class clazz,
java.lang.String fieldName,
java.lang.String srgName)
Changes the access level for the specified field for a class.
|
static java.lang.reflect.Method |
changeMethodAccess(java.lang.Class clazz,
java.lang.String methodName,
java.lang.Class<?>... params)
Changes the access level for the specified method for a class.
|
static java.lang.reflect.Method |
changeMethodAccess(java.lang.Class clazz,
java.lang.String methodName,
java.lang.String params) |
static java.lang.reflect.Method |
changeMethodAccess(java.lang.Class clazz,
java.lang.String methodName,
java.lang.String srgName,
java.lang.Class<?>... params)
Changes the access level for the specified method for a class.
|
static java.lang.reflect.Method |
changeMethodAccess(java.lang.Class clazz,
java.lang.String methodName,
java.lang.String srgName,
java.lang.String params) |
static org.objectweb.asm.tree.InsnList |
cloneList(org.objectweb.asm.tree.InsnList list) |
static boolean |
fieldInsnEqual(org.objectweb.asm.tree.FieldInsnNode insn1,
org.objectweb.asm.tree.FieldInsnNode insn2) |
static org.objectweb.asm.tree.AbstractInsnNode |
findInstruction(org.objectweb.asm.tree.MethodNode method,
org.objectweb.asm.tree.InsnList matches) |
static org.objectweb.asm.tree.AbstractInsnNode |
findInstruction(org.objectweb.asm.tree.MethodNode method,
org.objectweb.asm.tree.InsnList matches,
int index) |
static org.objectweb.asm.tree.MethodNode |
findMethod(org.objectweb.asm.tree.ClassNode clazz,
java.lang.String name)
find the method with the given name.
|
static org.objectweb.asm.tree.MethodNode |
findMethod(org.objectweb.asm.tree.ClassNode clazz,
java.lang.String name,
java.lang.String desc)
find the method with the given name and method descriptor.
|
static java.lang.String |
getMethodNodeAsString(org.objectweb.asm.tree.MethodNode methodNode) |
static boolean |
iincInsnEqual(org.objectweb.asm.tree.IincInsnNode node1,
org.objectweb.asm.tree.IincInsnNode node2) |
static boolean |
insnEqual(org.objectweb.asm.tree.AbstractInsnNode node1,
org.objectweb.asm.tree.AbstractInsnNode node2) |
static boolean |
intInsnEqual(org.objectweb.asm.tree.IntInsnNode node1,
org.objectweb.asm.tree.IntInsnNode node2) |
static boolean |
ldcInsnEqual(org.objectweb.asm.tree.LdcInsnNode insn1,
org.objectweb.asm.tree.LdcInsnNode insn2) |
static boolean |
methodInsnEqual(org.objectweb.asm.tree.MethodInsnNode insn1,
org.objectweb.asm.tree.MethodInsnNode insn2) |
static boolean |
typeInsnEqual(org.objectweb.asm.tree.TypeInsnNode insn1,
org.objectweb.asm.tree.TypeInsnNode insn2) |
static boolean |
varInsnEqual(org.objectweb.asm.tree.VarInsnNode insn1,
org.objectweb.asm.tree.VarInsnNode insn2) |
public static org.objectweb.asm.tree.MethodNode findMethod(org.objectweb.asm.tree.ClassNode clazz,
java.lang.String name)
clazz - the classname - the method name to search forpublic static org.objectweb.asm.tree.MethodNode findMethod(org.objectweb.asm.tree.ClassNode clazz,
java.lang.String name,
java.lang.String desc)
clazz - the classname - the method name to search fordesc - the method descriptor to search forType.getMethodDescriptor(org.objectweb.asm.Type, org.objectweb.asm.Type...)public static org.objectweb.asm.tree.AbstractInsnNode findInstruction(org.objectweb.asm.tree.MethodNode method,
org.objectweb.asm.tree.InsnList matches)
public static org.objectweb.asm.tree.AbstractInsnNode findInstruction(org.objectweb.asm.tree.MethodNode method,
org.objectweb.asm.tree.InsnList matches,
int index)
public static boolean insnEqual(org.objectweb.asm.tree.AbstractInsnNode node1,
org.objectweb.asm.tree.AbstractInsnNode node2)
public static boolean varInsnEqual(org.objectweb.asm.tree.VarInsnNode insn1,
org.objectweb.asm.tree.VarInsnNode insn2)
public static boolean methodInsnEqual(org.objectweb.asm.tree.MethodInsnNode insn1,
org.objectweb.asm.tree.MethodInsnNode insn2)
public static boolean fieldInsnEqual(org.objectweb.asm.tree.FieldInsnNode insn1,
org.objectweb.asm.tree.FieldInsnNode insn2)
public static boolean ldcInsnEqual(org.objectweb.asm.tree.LdcInsnNode insn1,
org.objectweb.asm.tree.LdcInsnNode insn2)
public static boolean typeInsnEqual(org.objectweb.asm.tree.TypeInsnNode insn1,
org.objectweb.asm.tree.TypeInsnNode insn2)
public static boolean iincInsnEqual(org.objectweb.asm.tree.IincInsnNode node1,
org.objectweb.asm.tree.IincInsnNode node2)
public static boolean intInsnEqual(org.objectweb.asm.tree.IntInsnNode node1,
org.objectweb.asm.tree.IntInsnNode node2)
public static java.lang.String getMethodNodeAsString(org.objectweb.asm.tree.MethodNode methodNode)
public static org.objectweb.asm.tree.InsnList cloneList(org.objectweb.asm.tree.InsnList list)
public static java.lang.reflect.Field changeFieldAccess(java.lang.Class clazz,
java.lang.String fieldName)
clazz - the clazzfieldName - the field namepublic static java.lang.reflect.Field changeFieldAccess(java.lang.Class clazz,
java.lang.String fieldName,
java.lang.String srgName)
clazz - the clazzfieldName - the field namesrgName - the srg namepublic static java.lang.reflect.Method changeMethodAccess(java.lang.Class clazz,
java.lang.String methodName,
java.lang.String params)
public static java.lang.reflect.Method changeMethodAccess(java.lang.Class clazz,
java.lang.String methodName,
java.lang.String srgName,
java.lang.String params)
public static java.lang.reflect.Method changeMethodAccess(java.lang.Class clazz,
java.lang.String methodName,
java.lang.Class<?>... params)
clazz - the clazzmethodName - the field namepublic static java.lang.reflect.Method changeMethodAccess(java.lang.Class clazz,
java.lang.String methodName,
java.lang.String srgName,
java.lang.Class<?>... params)
clazz - the clazzmethodName - the field namesrgName - the srg name