Package net.bytebuddy.agent.builder
Enum Class AgentBuilder.InitializationStrategy.NoOp
java.lang.Object
java.lang.Enum<AgentBuilder.InitializationStrategy.NoOp>
net.bytebuddy.agent.builder.AgentBuilder.InitializationStrategy.NoOp
- All Implemented Interfaces:
Serializable
,Comparable<AgentBuilder.InitializationStrategy.NoOp>
,Constable
,AgentBuilder.InitializationStrategy
,AgentBuilder.InitializationStrategy.Dispatcher
- Enclosing interface:
AgentBuilder.InitializationStrategy
public static enum AgentBuilder.InitializationStrategy.NoOp
extends Enum<AgentBuilder.InitializationStrategy.NoOp>
implements AgentBuilder.InitializationStrategy, AgentBuilder.InitializationStrategy.Dispatcher
A non-initializing initialization strategy.
-
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 class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
NoOp
private NoOp()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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.
-