Package net.bytebuddy.agent.builder
Class AgentBuilder.Transformer.Compound
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.Transformer.Compound
-
- All Implemented Interfaces:
AgentBuilder.Transformer
- Enclosing interface:
- AgentBuilder.Transformer
@Enhance public static class AgentBuilder.Transformer.Compound extends java.lang.Object implements AgentBuilder.Transformer
A compound transformer that allows to group severalAgentBuilder.Transformer
s as a single transformer.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Transformer
AgentBuilder.Transformer.Compound, AgentBuilder.Transformer.ForAdvice, AgentBuilder.Transformer.ForBuildPlugin, AgentBuilder.Transformer.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<AgentBuilder.Transformer>
transformers
The transformers to apply in their application order.
-
Constructor Summary
Constructors Constructor Description Compound(java.util.List<? extends AgentBuilder.Transformer> transformers)
Creates a new compound transformer.Compound(AgentBuilder.Transformer... transformer)
Creates a new compound transformer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicType.Builder<?>
transform(DynamicType.Builder<?> builder, TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module)
Allows for a transformation of aDynamicType.Builder
.
-
-
-
Field Detail
-
transformers
private final java.util.List<AgentBuilder.Transformer> transformers
The transformers to apply in their application order.
-
-
Constructor Detail
-
Compound
public Compound(AgentBuilder.Transformer... transformer)
Creates a new compound transformer.- Parameters:
transformer
- The transformers to apply in their application order.
-
Compound
public Compound(java.util.List<? extends AgentBuilder.Transformer> transformers)
Creates a new compound transformer.- Parameters:
transformers
- The transformers to apply in their application order.
-
-
Method Detail
-
transform
public DynamicType.Builder<?> transform(DynamicType.Builder<?> builder, TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module)
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.- Returns:
- A transformed version of the supplied
builder
.
-
-