Class ClassLoadingStrategy.ForBootstrapInjection

    • Constructor Detail

      • ForBootstrapInjection

        public ForBootstrapInjection​(Instrumentation instrumentation,
                                     File folder)
        Creates a new injector which is capable of injecting classes into the bootstrap class loader.
        Parameters:
        instrumentation - The instrumentation to use.
        folder - The folder to save jar files in.
    • Method Detail

      • load

        public Map<TypeDescription,​Class<?>> load​(ClassLoader classLoader,
                                                        Map<TypeDescription,​byte[]> types)
        Loads a given collection of classes given their binary representation.
        Specified by:
        load in interface ClassLoadingStrategy<ClassLoader>
        Parameters:
        classLoader - The class loader to used for loading the classes.
        types - Byte array representations of the types to be loaded mapped by their descriptions, where an iteration order defines an order in which they are supposed to be loaded, if relevant.
        Returns:
        A collection of the loaded classes which will be initialized in the iteration order of the returned collection.