Package net.bytebuddy.agent.builder
Enum AgentBuilder.InitializationStrategy.Minimal
java.lang.Object
java.lang.Enum<AgentBuilder.InitializationStrategy.Minimal>
net.bytebuddy.agent.builder.AgentBuilder.InitializationStrategy.Minimal
- All Implemented Interfaces:
Serializable
,Comparable<AgentBuilder.InitializationStrategy.Minimal>
,java.lang.constant.Constable
,AgentBuilder.InitializationStrategy
,AgentBuilder.InitializationStrategy.Dispatcher
- Enclosing interface:
AgentBuilder.InitializationStrategy
public static enum AgentBuilder.InitializationStrategy.Minimal
extends Enum<AgentBuilder.InitializationStrategy.Minimal>
implements AgentBuilder.InitializationStrategy, AgentBuilder.InitializationStrategy.Dispatcher
An initialization strategy that loads auxiliary types before loading the instrumented type. This strategy skips all types
that are a subtype of the instrumented type which would cause a premature loading of the instrumented type and abort
the instrumentation process.
-
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.agent.builder.AgentBuilder.InitializationStrategy
AgentBuilder.InitializationStrategy.Dispatcher, AgentBuilder.InitializationStrategy.Minimal, AgentBuilder.InitializationStrategy.NoOp, AgentBuilder.InitializationStrategy.SelfInjection
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(DynamicType.Builder<?> builder) Transforms the instrumented type to implement an appropriate initialization strategy.Creates a new dispatcher for injecting this initialization strategy during a transformation process.void
register
(DynamicType dynamicType, ClassLoader classLoader, ProtectionDomain protectionDomain, AgentBuilder.InjectionStrategy injectionStrategy) Registers a dynamic type for initialization and/or begins the initialization process.Returns the enum constant of this type with the specified name.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
-
Minimal
private Minimal()
-
-
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
-
dispatcher
Creates a new dispatcher for injecting this initialization strategy during a transformation process.- Specified by:
dispatcher
in interfaceAgentBuilder.InitializationStrategy
- Returns:
- The dispatcher to be used.
-
apply
Transforms the instrumented type to implement an appropriate initialization strategy.- Specified by:
apply
in interfaceAgentBuilder.InitializationStrategy.Dispatcher
- Parameters:
builder
- The builder which should implement the initialization strategy.- Returns:
- The given
builder
with the initialization strategy applied.
-
register
public void register(DynamicType dynamicType, @MaybeNull ClassLoader classLoader, @MaybeNull ProtectionDomain protectionDomain, AgentBuilder.InjectionStrategy injectionStrategy) Registers a dynamic type for initialization and/or begins the initialization process.- Specified by:
register
in interfaceAgentBuilder.InitializationStrategy.Dispatcher
- Parameters:
dynamicType
- The dynamic type that is created.classLoader
- The class loader of the dynamic type which can benull
to represent the bootstrap class loader.protectionDomain
- The instrumented type's protection domain ornull
if no protection domain is available.injectionStrategy
- The injection strategy to use.
-