Enum Class AgentBuilder.PoolStrategy.Eager

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

public static enum AgentBuilder.PoolStrategy.Eager extends Enum<AgentBuilder.PoolStrategy.Eager> implements AgentBuilder.PoolStrategy

A type locator that resolves all type descriptions eagerly.

The returned type pool uses a TypePool.CacheProvider.Simple and the ClassFileLocator that is provided by the builder's AgentBuilder.LocationStrategy.

  • Enum Constant Details

  • Field Details

  • Constructor Details

    • Eager

      private Eager(TypePool.Default.ReaderMode readerMode)
      Creates a new type locator.
      Parameters:
      readerMode - The reader mode to apply by this type locator.
  • Method Details

    • values

      public static AgentBuilder.PoolStrategy.Eager[] 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.PoolStrategy.Eager 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
    • typePool

      public TypePool typePool(ClassFileLocator classFileLocator, @MaybeNull ClassLoader classLoader)
      Creates a type pool for a given class file locator.
      Specified by:
      typePool in interface AgentBuilder.PoolStrategy
      Parameters:
      classFileLocator - The class file locator to use.
      classLoader - The class loader for which the class file locator was created or null if the boot loader.
      Returns:
      A type pool for the supplied class file locator.
    • typePool

      public TypePool typePool(ClassFileLocator classFileLocator, @MaybeNull ClassLoader classLoader, String name)
      Creates a type pool for a given class file locator. If a cache is used, the type that is currently instrumented is not used.
      Specified by:
      typePool in interface AgentBuilder.PoolStrategy
      Parameters:
      classFileLocator - The class file locator to use.
      classLoader - The class loader for which the class file locator was created or null if the boot loader.
      name - The name of the currently instrumented type.
      Returns:
      A type pool for the supplied class file locator.