Class AgentBuilder.InjectionStrategy.UsingUnsafe.OfFactory

java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.InjectionStrategy.UsingUnsafe.OfFactory
All Implemented Interfaces:
AgentBuilder.InjectionStrategy
Enclosing class:
AgentBuilder.InjectionStrategy.UsingUnsafe

@Enhance public static class AgentBuilder.InjectionStrategy.UsingUnsafe.OfFactory extends Object implements AgentBuilder.InjectionStrategy
An injection strategy that uses a factory for creating an unsafe injector.
  • Field Details

  • Constructor Details

    • OfFactory

      public OfFactory(ClassInjector.UsingUnsafe.Factory factory)
      Creates an injection strategy based on a factory.
      Parameters:
      factory - The factory to use for creating an unsafe injector.
  • Method Details

    • resolve

      public ClassInjector resolve(@MaybeNull ClassLoader classLoader, @MaybeNull ProtectionDomain protectionDomain)
      Resolves the class injector to use for a given class loader and protection domain.
      Specified by:
      resolve in interface AgentBuilder.InjectionStrategy
      Parameters:
      classLoader - The class loader to use or null if using the bootstrap loader.
      protectionDomain - The protection domain to use or null if all privileges should be assigned.
      Returns:
      The class injector to use.