Package net.bytebuddy.agent.builder
Interface AgentBuilder.Transformer
- All Known Implementing Classes:
AgentBuilder.Transformer.ForAdvice
,AgentBuilder.Transformer.ForBuildPlugin
- Enclosing interface:
AgentBuilder
public static interface AgentBuilder.Transformer
A transformer allows to apply modifications to a
DynamicType
. Such a modification
is then applied to any instrumented type that was matched by the preceding matcher.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiontransform
(DynamicType.Builder<?> builder, TypeDescription typeDescription, ClassLoader classLoader, JavaModule module, ProtectionDomain protectionDomain) Allows for a transformation of aDynamicType.Builder
.
-
Method Details
-
transform
DynamicType.Builder<?> transform(DynamicType.Builder<?> builder, TypeDescription typeDescription, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull ProtectionDomain protectionDomain) Allows for a transformation of aDynamicType.Builder
.- 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 ornull
if not available- Returns:
- A transformed version of the supplied
builder
.
-