Package net.bytebuddy.dynamic
Enum TypeResolutionStrategy.Disabled
- java.lang.Object
-
- java.lang.Enum<TypeResolutionStrategy.Disabled>
-
- net.bytebuddy.dynamic.TypeResolutionStrategy.Disabled
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TypeResolutionStrategy.Disabled>
,TypeResolutionStrategy
,TypeResolutionStrategy.Resolved
- Enclosing interface:
- TypeResolutionStrategy
public static enum TypeResolutionStrategy.Disabled extends java.lang.Enum<TypeResolutionStrategy.Disabled> implements TypeResolutionStrategy, TypeResolutionStrategy.Resolved
A type resolution strategy that does not allow for explicit loading of a class and that does not inject any code into the type initializer.
-
-
Nested Class Summary
-
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 Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
Disabled()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <S extends java.lang.ClassLoader>
java.util.Map<TypeDescription,java.lang.Class<?>>initialize(DynamicType dynamicType, S classLoader, ClassLoadingStrategy<? super S> classLoadingStrategy)
Loads and initializes a dynamic type.TypeInitializer
injectedInto(TypeInitializer typeInitializer)
Injects a type initializer into the supplied type initializer, if applicable.TypeResolutionStrategy.Resolved
resolve()
Resolves a type resolution strategy for actual application.static TypeResolutionStrategy.Disabled
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TypeResolutionStrategy.Disabled[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final TypeResolutionStrategy.Disabled INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static TypeResolutionStrategy.Disabled[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TypeResolutionStrategy.Disabled c : TypeResolutionStrategy.Disabled.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeResolutionStrategy.Disabled valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
resolve
public TypeResolutionStrategy.Resolved resolve()
Resolves a type resolution strategy for actual application.- Specified by:
resolve
in interfaceTypeResolutionStrategy
- Returns:
- A resolved version of this type resolution strategy.
-
injectedInto
public TypeInitializer injectedInto(TypeInitializer typeInitializer)
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 java.lang.ClassLoader> java.util.Map<TypeDescription,java.lang.Class<?>> initialize(DynamicType dynamicType, 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.
-
-