@HashCodeAndEqualsPlugin.Enhance public static class ClassLoadingStrategy.ForBootstrapInjection extends java.lang.Object implements ClassLoadingStrategy<java.lang.ClassLoader>
ClassLoadingStrategy.Configurable<S extends java.lang.ClassLoader>, ClassLoadingStrategy.Default, ClassLoadingStrategy.ForBootstrapInjection, ClassLoadingStrategy.ForUnsafeInjection, ClassLoadingStrategy.UsingLookup
Modifier and Type | Field and Description |
---|---|
private java.io.File |
folder
The folder to save jar files in.
|
private java.lang.instrument.Instrumentation |
instrumentation
The instrumentation to use.
|
BOOTSTRAP_LOADER, NO_PROTECTION_DOMAIN
Constructor and Description |
---|
ForBootstrapInjection(java.lang.instrument.Instrumentation instrumentation,
java.io.File folder)
Creates a new injector which is capable of injecting classes into the bootstrap class loader.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<TypeDescription,java.lang.Class<?>> |
load(java.lang.ClassLoader classLoader,
java.util.Map<TypeDescription,byte[]> types)
Loads a given collection of classes given their binary representation.
|
private final java.lang.instrument.Instrumentation instrumentation
private final java.io.File folder
public ForBootstrapInjection(java.lang.instrument.Instrumentation instrumentation, java.io.File folder)
instrumentation
- The instrumentation to use.folder
- The folder to save jar files in.public java.util.Map<TypeDescription,java.lang.Class<?>> load(java.lang.ClassLoader classLoader, java.util.Map<TypeDescription,byte[]> types)
load
in interface ClassLoadingStrategy<java.lang.ClassLoader>
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.