Class DebugGenerators
- java.lang.Object
-
- com.offbynull.coroutines.instrumenter.generators.DebugGenerators
-
public final class DebugGenerators extends java.lang.ObjectUtility class to generate bytecode instructions that help debug instrumented code.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDebugGenerators.MarkerTypeDebug marker type.
-
Constructor Summary
Constructors Modifier Constructor Description privateDebugGenerators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.objectweb.asm.tree.InsnListdebugMarker(DebugGenerators.MarkerType markerType, java.lang.String text)Generates instructions for generating marker instructions.static org.objectweb.asm.tree.InsnListdebugPrint(org.objectweb.asm.tree.InsnList text)Generates instructions for printing out a string usingSystem.out.
-
-
-
Method Detail
-
debugMarker
public static org.objectweb.asm.tree.InsnList debugMarker(DebugGenerators.MarkerType markerType, java.lang.String text)
Generates instructions for generating marker instructions. These marker instructions are meant to be is useful for debugging instrumented code. For example, you can spot a specific portion of instrumented code by looking for specific markers in the assembly output.- Parameters:
markerType- marker type (determines what kind of instructions are generated)text- text to print out- Returns:
- instructions to call System.out.println with a string constant
- Throws:
java.lang.NullPointerException- if any argument isnull
-
debugPrint
public static org.objectweb.asm.tree.InsnList debugPrint(org.objectweb.asm.tree.InsnList text)
Generates instructions for printing out a string usingSystem.out. This is useful for debugging. For example, you can print out lines around your instrumented code to make sure that what you think is being run is actually being run.- Parameters:
text- debug text generation instruction list -- must leave a String on the stack- Returns:
- instructions to call System.out.println with a string constant
- Throws:
java.lang.NullPointerException- if any argument isnull
-
-