Package net.bytebuddy.agent.builder
Class AgentBuilder.LocationStrategy.Compound
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.LocationStrategy.Compound
- All Implemented Interfaces:
AgentBuilder.LocationStrategy
- Enclosing interface:
AgentBuilder.LocationStrategy
@Enhance
public static class AgentBuilder.LocationStrategy.Compound
extends Object
implements AgentBuilder.LocationStrategy
A compound location strategy that applies a list of location strategies.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.LocationStrategy
AgentBuilder.LocationStrategy.Compound, AgentBuilder.LocationStrategy.ForClassLoader, AgentBuilder.LocationStrategy.NoOp, AgentBuilder.LocationStrategy.Simple
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<AgentBuilder.LocationStrategy> The location strategies in their application order. -
Constructor Summary
ConstructorsConstructorDescriptionCompound
(List<? extends AgentBuilder.LocationStrategy> locationStrategies) Creates a new compound location strategy.Compound
(AgentBuilder.LocationStrategy... locationStrategy) Creates a new compound location strategy. -
Method Summary
Modifier and TypeMethodDescriptionclassFileLocator
(ClassLoader classLoader, JavaModule module) Creates a class file locator for a given class loader and module combination.
-
Field Details
-
locationStrategies
The location strategies in their application order.
-
-
Constructor Details
-
Compound
Creates a new compound location strategy.- Parameters:
locationStrategy
- The location strategies in their application order.
-
Compound
Creates a new compound location strategy.- Parameters:
locationStrategies
- The location strategies in their application order.
-
-
Method Details
-
classFileLocator
public ClassFileLocator classFileLocator(@MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module) Creates a class file locator for a given class loader and module combination.- Specified by:
classFileLocator
in interfaceAgentBuilder.LocationStrategy
- Parameters:
classLoader
- The class loader that is loading an instrumented type. Might benull
to represent the bootstrap class loader.module
- The type's module ornull
if Java modules are not supported on the current VM.- Returns:
- The class file locator to use.
-