Package net.bytebuddy.dynamic.scaffold
Class TypeWriter.Default.ClassDumpAction
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.TypeWriter.Default.ClassDumpAction
-
- All Implemented Interfaces:
java.security.PrivilegedExceptionAction<java.lang.Void>
- Enclosing class:
- TypeWriter.Default<S>
@Enhance protected static class TypeWriter.Default.ClassDumpAction extends java.lang.Object implements java.security.PrivilegedExceptionAction<java.lang.Void>
An action to write a class file to the dumping location.
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
binaryRepresentation
The type's binary representation.private TypeDescription
instrumentedType
The instrumented type.private static java.lang.Void
NOTHING
Indicates that nothing is returned from this action.private boolean
original
true
if the dumped class file is an input to a class transformation.private java.lang.String
target
The target folder for writing the class file to.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClassDumpAction(java.lang.String target, TypeDescription instrumentedType, boolean original, byte[] binaryRepresentation)
Creates a new class dump action.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
dump(java.lang.String dumpFolder, TypeDescription instrumentedType, boolean original, byte[] binaryRepresentation)
Dumps the instrumented type if aTypeWriter.Default.DUMP_FOLDER
is configured.java.lang.Void
run()
-
-
-
Field Detail
-
NOTHING
private static final java.lang.Void NOTHING
Indicates that nothing is returned from this action.
-
target
private final java.lang.String target
The target folder for writing the class file to.
-
instrumentedType
private final TypeDescription instrumentedType
The instrumented type.
-
original
private final boolean original
true
if the dumped class file is an input to a class transformation.
-
binaryRepresentation
private final byte[] binaryRepresentation
The type's binary representation.
-
-
Constructor Detail
-
ClassDumpAction
protected ClassDumpAction(java.lang.String target, TypeDescription instrumentedType, boolean original, byte[] binaryRepresentation)
Creates a new class dump action.- Parameters:
target
- The target folder for writing the class file to.instrumentedType
- The instrumented type.original
-true
if the dumped class file is an input to a class transformation.binaryRepresentation
- The type's binary representation.
-
-
Method Detail
-
dump
protected static void dump(java.lang.String dumpFolder, TypeDescription instrumentedType, boolean original, byte[] binaryRepresentation)
Dumps the instrumented type if aTypeWriter.Default.DUMP_FOLDER
is configured.- Parameters:
dumpFolder
- The dump folder.instrumentedType
- The instrumented type.original
-true
if the dumped class file is an input to a class transformation.binaryRepresentation
- The binary representation.
-
run
public java.lang.Void run() throws java.lang.Exception
- Specified by:
run
in interfacejava.security.PrivilegedExceptionAction<java.lang.Void>
- Throws:
java.lang.Exception
-
-