Class AsmClassWriter.ForClassFileApi

java.lang.Object
net.bytebuddy.utility.AsmClassWriter.ForClassFileApi
All Implemented Interfaces:
AsmClassWriter
Enclosing interface:
AsmClassWriter

public static class AsmClassWriter.ForClassFileApi extends Object implements AsmClassWriter
A Class File API-based implementation for a class writer.
  • Field Details

    • DISPATCHER

      private static final AsmClassWriter.ForClassFileApi.JdkClassWriter DISPATCHER
      The dispatcher for interacting with a codes.rafael.asmjdkbridge.JdkClassWriter.
    • classWriter

      private final org.objectweb.asm.ClassVisitor classWriter
      The represented class writer.
  • Constructor Details

    • ForClassFileApi

      public ForClassFileApi(org.objectweb.asm.ClassVisitor classWriter)
      Creates a new class file API-based class writer.
      Parameters:
      classWriter - The represented class writer.
  • Method Details

    • doPrivileged

      @Enhance private static <T> T doPrivileged(PrivilegedAction<T> action)
      A proxy for java.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 the ClassVisitor to use for writing the class file.
      Specified by:
      getVisitor in interface AsmClassWriter
      Returns:
      An appropriate class visitor.
    • getBinaryRepresentation

      public byte[] getBinaryRepresentation()
      Returns the binary representation of the created class file.
      Specified by:
      getBinaryRepresentation in interface AsmClassWriter
      Returns:
      The binary representation of the created class file.