Top Description Inners Fields Methods
net.bytebuddy.dynamic.loading

public Interface ClassLoadingStrategy<T extends java.lang.ClassLoader>

Known Direct Subinterfaces
net.bytebuddy.dynamic.loading.ClassLoadingStrategy.Configurable
Known Direct Implementers
net.bytebuddy.dynamic.loading.ClassLoadingStrategy.UsingLookup, net.bytebuddy.dynamic.loading.ClassLoadingStrategy.ForBootstrapInjection, net.bytebuddy.dynamic.loading.ClassLoadingStrategy.ForUnsafeInjection, net.bytebuddy.dynamic.loading.ClassLoadingStrategy.ForJnaInjection, net.bytebuddy.dynamic.loading.ClassReloadingStrategy, net.bytebuddy.dynamic.loading.InjectionClassLoader.Strategy
Type Parameters
<T>
The least specific type of class loader this strategy can apply to.
Imports
net.bytebuddy.build.HashCodeAndEqualsPlugin, net.bytebuddy.description.type.TypeDescription, net.bytebuddy.utility.nullability.AlwaysNull, .MaybeNull, java.io.File, java.lang.instrument.Instrumentation, java.security.ProtectionDomain, java.util.Map, java.util.concurrent.Callable

A strategy for loading a collection of types.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ClassLoadingStrategy.Configurable<
The least specific type of class loader this strategy can apply to.
S extends ClassLoader
>

A ClassLoadingStrategy that allows configuring the strategy's behavior.

public static enum
ClassLoadingStrategy.Default

This class contains implementations of default class loading strategies.

public static class
ClassLoadingStrategy.ForBootstrapInjection

A class loading strategy which allows class injection into the bootstrap class loader if appropriate.

public static class
ClassLoadingStrategy.ForJnaInjection

A class loading strategy that injects a class using JNA via the JNI DefineClass method.

public static class
ClassLoadingStrategy.ForUnsafeInjection

A class loading strategy that injects a class using sun.misc.Unsafe or jdk.internal.misc.Unsafe.

public static class
ClassLoadingStrategy.UsingLookup

A class loading strategy that uses a java.lang.invoke.MethodHandles$Lookup instance for defining types.

Field Summary

Modifier and TypeField and Description
public static final ClassLoader
BOOTSTRAP_LOADER

A type-safe constant representing the bootstrap class loader which is represented by null within Java.

public static final ProtectionDomain
NO_PROTECTION_DOMAIN

An undefined protection domain.

Method Summary

Modifier and TypeMethod and Description
public Map<TypeDescription, Class<?>>

Returns:

A collection of the loaded classes which will be initialized in the iteration order of the returned collection.
load
(T
The class loader to used for loading the classes.
classLoader
,
Map<TypeDescription, byte[]>
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.
types
)

Loads a given collection of classes given their binary representation.