Package jadex.bdiv3

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 Detail

      • ByteKeepingASMBDIClassGenerator

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

      • toClass

        public java.lang.Class<?> toClass​(java.lang.String name,
                                          byte[] data,
                                          java.lang.ClassLoader loader,
                                          java.security.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 java.util.Map<java.lang.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.