public class BytecodePrinter
extends java.lang.Object
Constructor and Description |
---|
BytecodePrinter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
insnToString(org.objectweb.asm.tree.AbstractInsnNode insn)
Converts an instruction node to a String.
|
static void |
logMethod(org.objectweb.asm.tree.MethodNode main,
org.apache.logging.log4j.Logger logger)
Logs the bytecode of a method using the ASM logger.
|
static void |
logMethod(org.objectweb.asm.tree.MethodNode main,
java.lang.String path)
Logs the bytecode of a method to a file.
|
static void |
printMethod(org.objectweb.asm.tree.MethodNode main)
Prints the bytecode of a method using System.out.print().
|
public static void printMethod(org.objectweb.asm.tree.MethodNode main)
main
- the method to printpublic static void logMethod(org.objectweb.asm.tree.MethodNode main, org.apache.logging.log4j.Logger logger)
main
- the method to printlogger
- the Log4j Logger
to print it withpublic static void logMethod(org.objectweb.asm.tree.MethodNode main, java.lang.String path)
main
- the method to printpath
- the file to log it topublic static java.lang.String insnToString(org.objectweb.asm.tree.AbstractInsnNode insn)
insn
- the node to convert