Interface AgentBuilder.LocationStrategy

All Known Implementing Classes:
AgentBuilder.LocationStrategy.Compound, AgentBuilder.LocationStrategy.ForClassLoader, AgentBuilder.LocationStrategy.NoOp, AgentBuilder.LocationStrategy.Simple
Enclosing interface:
AgentBuilder

public static interface AgentBuilder.LocationStrategy
A strategy for creating a ClassFileLocator when instrumenting a type.
  • Method Details

    • classFileLocator

      ClassFileLocator classFileLocator(@MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module)
      Creates a class file locator for a given class loader and module combination.
      Parameters:
      classLoader - The class loader that is loading an instrumented type. Might be null to represent the bootstrap class loader.
      module - The type's module or null if Java modules are not supported on the current VM.
      Returns:
      The class file locator to use.