Package net.bytebuddy.dynamic
Enum TypeResolutionStrategy.Lazy
- All Implemented Interfaces:
Serializable
,Comparable<TypeResolutionStrategy.Lazy>
,java.lang.constant.Constable
,TypeResolutionStrategy
,TypeResolutionStrategy.Resolved
- Enclosing interface:
TypeResolutionStrategy
public static enum TypeResolutionStrategy.Lazy
extends Enum<TypeResolutionStrategy.Lazy>
implements TypeResolutionStrategy, TypeResolutionStrategy.Resolved
A type resolution strategy that does not apply any
LoadedTypeInitializer
s but only loads all types.-
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.TypeResolutionStrategy
TypeResolutionStrategy.Active, TypeResolutionStrategy.Disabled, TypeResolutionStrategy.Lazy, TypeResolutionStrategy.Passive, TypeResolutionStrategy.Resolved
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<S extends ClassLoader>
Map<TypeDescription, Class<?>> initialize
(DynamicType dynamicType, S classLoader, ClassLoadingStrategy<? super S> classLoadingStrategy) Loads and initializes a dynamic type.injectedInto
(TypeInitializer typeInitializer) Injects a type initializer into the supplied type initializer, if applicable.resolve()
Resolves a type resolution strategy for actual application.static TypeResolutionStrategy.Lazy
Returns the enum constant of this type with the specified name.static TypeResolutionStrategy.Lazy[]
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
-
Lazy
private Lazy()
-
-
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
-
resolve
Resolves a type resolution strategy for actual application.- Specified by:
resolve
in interfaceTypeResolutionStrategy
- Returns:
- A resolved version of this type resolution strategy.
-
injectedInto
Injects a type initializer into the supplied type initializer, if applicable. This way, a type resolution strategy is capable of injecting code into the generated class's initializer to inline the initialization.- Specified by:
injectedInto
in interfaceTypeResolutionStrategy.Resolved
- Parameters:
typeInitializer
- The type initializer to potentially expend.- Returns:
- A type initializer to apply for performing the represented type resolution.
-
initialize
public <S extends ClassLoader> Map<TypeDescription,Class<?>> initialize(DynamicType dynamicType, @MaybeNull S classLoader, ClassLoadingStrategy<? super S> classLoadingStrategy) Loads and initializes a dynamic type.- Specified by:
initialize
in interfaceTypeResolutionStrategy.Resolved
- Type Parameters:
S
- The least specific type of class loader this strategy can apply to.- Parameters:
dynamicType
- The dynamic type to initialize.classLoader
- The class loader to use.classLoadingStrategy
- The class loading strategy to use.- Returns:
- A map of all type descriptions mapped to their representation as a loaded class.
-