Class ClassLoadingStrategy.Default.WrappingDispatcher

    • Constructor Detail

      • WrappingDispatcher

        protected WrappingDispatcher​(ByteArrayClassLoader.PersistenceHandler persistenceHandler,
                                     boolean childFirst)
        Creates a new wrapping dispatcher with a default protection domain and a default access control context.
        Parameters:
        persistenceHandler - The persistence handler to apply.
        childFirst - true if the created class loader should apply child-first semantics.
    • Method Detail

      • load

        public java.util.Map<TypeDescription,​java.lang.Class<?>> load​(java.lang.ClassLoader classLoader,
                                                                            java.util.Map<TypeDescription,​byte[]> types)
        Description copied from interface: ClassLoadingStrategy
        Loads a given collection of classes given their binary representation.
        Specified by:
        load in interface ClassLoadingStrategy<java.lang.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.
      • allowExistingTypes

        public ClassLoadingStrategy.Configurable<java.lang.ClassLoader> allowExistingTypes()
        Description copied from interface: ClassLoadingStrategy.Configurable
        Determines if this class loading strategy should not throw an exception when attempting to load a class that was already loaded. In this case, the already loaded class is used instead of the generated class.
        Specified by:
        allowExistingTypes in interface ClassLoadingStrategy.Configurable<java.lang.ClassLoader>
        Returns:
        A version of this class loading strategy that does not throw an exception when a class is already loaded.