Package ftbsc.lll.utils.debug
Class BytecodePrinter
java.lang.Object
ftbsc.lll.utils.debug.BytecodePrinter
A collection of static methods for debugging by printing the ASM bytecode.
These methods are only for debug, so most of the time they should stay unused.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringinsnToString(org.objectweb.asm.tree.AbstractInsnNode insn) Converts an instruction node to a String.static voidlogMethod(org.objectweb.asm.tree.MethodNode main) Logs the bytecode of a method on System.out.static voidLogs the bytecode of a method to a file.static voidLogs the bytecode of a method into a given sink.
-
Constructor Details
-
BytecodePrinter
public BytecodePrinter()
-
-
Method Details
-
logMethod
public static void logMethod(org.objectweb.asm.tree.MethodNode main) Logs the bytecode of a method on System.out.- Parameters:
main- the method to print
-
logMethod
Logs the bytecode of a method into a given sink.- Parameters:
main- the method to printlogFn- a consumer for the string, typically a logging function- Since:
- 0.6.0
-
logMethod
Logs the bytecode of a method to a file.- Parameters:
main- the method to printpath- the file to log it to
-
insnToString
Converts an instruction node to a String.- Parameters:
insn- the node to convert- Returns:
- the converted string
-