Class ByteKeepingASMBDIClassGenerator

All Implemented Interfaces:
IBDIClassGenerator

public class ByteKeepingASMBDIClassGenerator extends ASMBDIClassGenerator
This class generator keeps generated byte-code as byte[] to be post-processed by other classes. Currently, this is used by compile-time BDI-enhancing with maven/gradle-plugins (for android).
  • Constructor Details

    • ByteKeepingASMBDIClassGenerator

      public ByteKeepingASMBDIClassGenerator()
      Create a new generator.
  • Method Details

    • toClass

      public Class<?> toClass(String name, byte[] data, ClassLoader loader, ProtectionDomain domain)
      Description copied from class: ASMBDIClassGenerator
      Transform byte Array into Class and define it in classloader.
      Overrides:
      toClass in class ASMBDIClassGenerator
      Returns:
      the loaded class or null, if the class is not valid, such as Map.entry "inner Classes".
    • getRecentClassBytes

      public Map<String,byte[]> getRecentClassBytes()
      Get the recently generated classes as byte array.
      Returns:
      recently generated classes
    • clearRecentClassBytes

      public void clearRecentClassBytes()
      Clear the list of recently generated classes.