Class AsmClassWriter.ForAsm

  • All Implemented Interfaces:
    AsmClassWriter
    Enclosing interface:
    AsmClassWriter

    public static class AsmClassWriter.ForAsm
    extends java.lang.Object
    implements AsmClassWriter
    Am implementation that uses ASM's internal ClassWriter.
    • Field Detail

      • classWriter

        private final org.objectweb.asm.ClassWriter classWriter
        The represented class writer.
    • Constructor Detail

      • ForAsm

        public ForAsm​(org.objectweb.asm.ClassWriter classWriter)
        Creates a new class writer based upon ASM's own implementation.
        Parameters:
        classWriter - The represented class writer.
    • Method Detail

      • 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.