Package org.codehaus.groovy.classgen.asm
Class BytecodeDumper
java.lang.Object
org.codehaus.groovy.classgen.asm.BytecodeDumper
- All Implemented Interfaces:
BytecodeProcessor
A utility class which can be used in test cases to dump generated bytecode.
- Since:
- 2.4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BytecodeDumperDumps generated bytecode toSystem.err. -
Constructor Summary
ConstructorsConstructorDescriptionBytecodeDumper(Writer out) Creates a bytecode dumper that writes to the supplied stream. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]processBytecode(String name, byte[] original) Transforms the bytecode for a generated class.
-
Field Details
-
STANDARD_ERR
Dumps generated bytecode toSystem.err.
-
-
Constructor Details
-
BytecodeDumper
Creates a bytecode dumper that writes to the supplied stream.- Parameters:
out- the destination writer
-
-
Method Details
-
processBytecode
Transforms the bytecode for a generated class.- Specified by:
processBytecodein interfaceBytecodeProcessor- Parameters:
name- the class nameoriginal- the original class bytes- Returns:
- the processed class bytes
-