Package net.bytebuddy.agent.builder
Class AgentBuilder.InitializationStrategy.SelfInjection.Dispatcher
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.InitializationStrategy.SelfInjection.Dispatcher
-
- All Implemented Interfaces:
AgentBuilder.InitializationStrategy.Dispatcher
- Direct Known Subclasses:
AgentBuilder.InitializationStrategy.SelfInjection.Eager.Dispatcher
,AgentBuilder.InitializationStrategy.SelfInjection.Lazy.Dispatcher
,AgentBuilder.InitializationStrategy.SelfInjection.Split.Dispatcher
- Enclosing class:
- AgentBuilder.InitializationStrategy.SelfInjection
@Enhance protected abstract static class AgentBuilder.InitializationStrategy.SelfInjection.Dispatcher extends java.lang.Object implements AgentBuilder.InitializationStrategy.Dispatcher
A dispatcher for a self-initialization strategy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AgentBuilder.InitializationStrategy.SelfInjection.Dispatcher.InjectingInitializer
A type initializer that injects all auxiliary types of the instrumented type.
-
Field Summary
Fields Modifier and Type Field Description protected int
identification
A random identification for the applied self-initialization.protected NexusAccessor
nexusAccessor
The nexus accessor to use.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Dispatcher(NexusAccessor nexusAccessor, int identification)
Creates a new dispatcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicType.Builder<?>
apply(DynamicType.Builder<?> builder)
Transforms the instrumented type to implement an appropriate initialization strategy.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.agent.builder.AgentBuilder.InitializationStrategy.Dispatcher
register
-
-
-
-
Field Detail
-
nexusAccessor
protected final NexusAccessor nexusAccessor
The nexus accessor to use.
-
identification
protected final int identification
A random identification for the applied self-initialization.
-
-
Constructor Detail
-
Dispatcher
protected Dispatcher(NexusAccessor nexusAccessor, int identification)
Creates a new dispatcher.- Parameters:
nexusAccessor
- The nexus accessor to use.identification
- A random identification for the applied self-initialization.
-
-
Method Detail
-
apply
public DynamicType.Builder<?> apply(DynamicType.Builder<?> builder)
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.
-
-