Enum Class AgentBuilder.InjectionStrategy.UsingUnsafe

java.lang.Object
java.lang.Enum<AgentBuilder.InjectionStrategy.UsingUnsafe>
net.bytebuddy.agent.builder.AgentBuilder.InjectionStrategy.UsingUnsafe
All Implemented Interfaces:
Serializable, Comparable<AgentBuilder.InjectionStrategy.UsingUnsafe>, Constable, AgentBuilder.InjectionStrategy
Enclosing interface:
AgentBuilder.InjectionStrategy

public static enum AgentBuilder.InjectionStrategy.UsingUnsafe extends Enum<AgentBuilder.InjectionStrategy.UsingUnsafe> implements AgentBuilder.InjectionStrategy
An injection strategy that uses sun.misc.Unsafe or jdk.internal.misc.Unsafe to inject classes.
  • Enum Constant Details

  • Constructor Details

    • UsingUnsafe

      private UsingUnsafe()
  • Method Details

    • values

      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AgentBuilder.InjectionStrategy.UsingUnsafe valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • 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.