Package net.bytebuddy.agent.builder
Class AgentBuilder.Transformer.ForBuildPlugin
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.Transformer.ForBuildPlugin
- All Implemented Interfaces:
AgentBuilder.Transformer
- Enclosing interface:
AgentBuilder.Transformer
@Enhance
public static class AgentBuilder.Transformer.ForBuildPlugin
extends Object
implements AgentBuilder.Transformer
A transformer that applies a build
Plugin
. Note that a transformer is never completed as class loading
might happen dynamically such that plugins are not closed.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Transformer
AgentBuilder.Transformer.ForAdvice, AgentBuilder.Transformer.ForBuildPlugin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontransform
(DynamicType.Builder<?> builder, TypeDescription typeDescription, ClassLoader classLoader, JavaModule module, ProtectionDomain protectionDomain) Allows for a transformation of aDynamicType.Builder
.
-
Field Details
-
plugin
The plugin to apply.
-
-
Constructor Details
-
ForBuildPlugin
Creates a new transformer for a buildPlugin
.- Parameters:
plugin
- The plugin to apply.
-
-
Method Details
-
transform
public DynamicType.Builder<?> transform(DynamicType.Builder<?> builder, TypeDescription typeDescription, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, ProtectionDomain protectionDomain) Allows for a transformation of aDynamicType.Builder
.- Specified by:
transform
in interfaceAgentBuilder.Transformer
- Parameters:
builder
- The dynamic builder to transform.typeDescription
- The description of the type currently being instrumented.classLoader
- The class loader of the instrumented class. Might benull
to represent the bootstrap class loader.module
- The class's module ornull
if the current VM does not support modules.protectionDomain
- The protection domain of the transformed type.- Returns:
- A transformed version of the supplied
builder
.
-