Package net.bytebuddy.dynamic.loading
Enum InjectionClassLoader.Strategy
java.lang.Object
java.lang.Enum<InjectionClassLoader.Strategy>
net.bytebuddy.dynamic.loading.InjectionClassLoader.Strategy
- All Implemented Interfaces:
Serializable
,Comparable<InjectionClassLoader.Strategy>
,java.lang.constant.Constable
,ClassLoadingStrategy<InjectionClassLoader>
- Enclosing class:
InjectionClassLoader
public static enum InjectionClassLoader.Strategy
extends Enum<InjectionClassLoader.Strategy>
implements ClassLoadingStrategy<InjectionClassLoader>
A class loading strategy for adding a type to an injection class loader.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.ClassLoadingStrategy
ClassLoadingStrategy.Configurable<S extends ClassLoader>, ClassLoadingStrategy.Default, ClassLoadingStrategy.ForBootstrapInjection, ClassLoadingStrategy.ForJnaInjection, ClassLoadingStrategy.ForUnsafeInjection, ClassLoadingStrategy.UsingLookup
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields inherited from interface net.bytebuddy.dynamic.loading.ClassLoadingStrategy
BOOTSTRAP_LOADER, NO_PROTECTION_DOMAIN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMap
<TypeDescription, Class<?>> load
(InjectionClassLoader classLoader, Map<TypeDescription, byte[]> types) Loads a given collection of classes given their binary representation.Returns the enum constant of this type with the specified name.static InjectionClassLoader.Strategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
Strategy
private Strategy()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
load
public Map<TypeDescription,Class<?>> load(@MaybeNull InjectionClassLoader classLoader, Map<TypeDescription, byte[]> types) Loads a given collection of classes given their binary representation.- Specified by:
load
in interfaceClassLoadingStrategy<InjectionClassLoader>
- 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.
-