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 java.lang.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
Fields Modifier and Type Field Description private java.util.List<AgentBuilder.LocationStrategy>locationStrategiesThe location strategies in their application order.
-
Constructor Summary
Constructors Constructor Description Compound(java.util.List<? extends AgentBuilder.LocationStrategy> locationStrategies)Creates a new compound location strategy.Compound(AgentBuilder.LocationStrategy... locationStrategy)Creates a new compound location strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassFileLocatorclassFileLocator(java.lang.ClassLoader classLoader, JavaModule module)Creates a class file locator for a given class loader and module combination.
-
-
-
Field Detail
-
locationStrategies
private final java.util.List<AgentBuilder.LocationStrategy> locationStrategies
The location strategies in their application order.
-
-
Constructor Detail
-
Compound
public Compound(AgentBuilder.LocationStrategy... locationStrategy)
Creates a new compound location strategy.- Parameters:
locationStrategy- The location strategies in their application order.
-
Compound
public Compound(java.util.List<? extends AgentBuilder.LocationStrategy> locationStrategies)
Creates a new compound location strategy.- Parameters:
locationStrategies- The location strategies in their application order.
-
-
Method Detail
-
classFileLocator
public ClassFileLocator classFileLocator(@MaybeNull java.lang.ClassLoader classLoader, @MaybeNull JavaModule module)
Creates a class file locator for a given class loader and module combination.- Specified by:
classFileLocatorin interfaceAgentBuilder.LocationStrategy- Parameters:
classLoader- The class loader that is loading an instrumented type. Might benullto represent the bootstrap class loader.module- The type's module ornullif Java modules are not supported on the current VM.- Returns:
- The class file locator to use.
-
-