Package net.bytebuddy.utility
Class AsmClassWriter.ForClassFileApi
- java.lang.Object
-
- net.bytebuddy.utility.AsmClassWriter.ForClassFileApi
-
- All Implemented Interfaces:
AsmClassWriter
- Enclosing interface:
- AsmClassWriter
public static class AsmClassWriter.ForClassFileApi extends java.lang.Object implements AsmClassWriter
A Class File API-based implementation for a class writer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
AsmClassWriter.ForClassFileApi.JdkClassWriter
An API to interact withcodes.rafael.asmjdkbridge.JdkClassWriter
.-
Nested classes/interfaces inherited from interface net.bytebuddy.utility.AsmClassWriter
AsmClassWriter.Factory, AsmClassWriter.ForAsm, AsmClassWriter.ForClassFileApi, AsmClassWriter.FrameComputingClassWriter, AsmClassWriter.SuperClassResolvingJdkClassWriter
-
-
Field Summary
Fields Modifier and Type Field Description private org.objectweb.asm.ClassVisitor
classWriter
The represented class writer.private static AsmClassWriter.ForClassFileApi.JdkClassWriter
DISPATCHER
The dispatcher for interacting with acodes.rafael.asmjdkbridge.JdkClassWriter
.
-
Constructor Summary
Constructors Constructor Description ForClassFileApi(org.objectweb.asm.ClassVisitor classWriter)
Creates a new class file API-based class writer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T> T
doPrivileged(java.security.PrivilegedAction<T> action)
A proxy forjava.security.AccessController#doPrivileged
that is activated if available.byte[]
getBinaryRepresentation()
Returns the binary representation of the created class file.org.objectweb.asm.ClassVisitor
getVisitor()
Returns theClassVisitor
to use for writing the class file.
-
-
-
Field Detail
-
DISPATCHER
private static final AsmClassWriter.ForClassFileApi.JdkClassWriter DISPATCHER
The dispatcher for interacting with acodes.rafael.asmjdkbridge.JdkClassWriter
.
-
classWriter
private final org.objectweb.asm.ClassVisitor classWriter
The represented class writer.
-
-
Method Detail
-
doPrivileged
@Enhance private static <T> T doPrivileged(java.security.PrivilegedAction<T> action)
A proxy forjava.security.AccessController#doPrivileged
that is activated if available.- Type Parameters:
T
- The type of the action's resolved value.- Parameters:
action
- The action to execute from a privileged context.- Returns:
- The action's resolved value.
-
getVisitor
public org.objectweb.asm.ClassVisitor getVisitor()
Returns theClassVisitor
to use for writing the class file.- Specified by:
getVisitor
in interfaceAsmClassWriter
- Returns:
- An appropriate class visitor.
-
getBinaryRepresentation
public byte[] getBinaryRepresentation()
Returns the binary representation of the created class file.- Specified by:
getBinaryRepresentation
in interfaceAsmClassWriter
- Returns:
- The binary representation of the created class file.
-
-