Package net.bytebuddy.agent.builder
Interface AgentBuilder.PoolStrategy
- All Known Implementing Classes:
AgentBuilder.PoolStrategy.ClassLoading,AgentBuilder.PoolStrategy.Default,AgentBuilder.PoolStrategy.Eager,AgentBuilder.PoolStrategy.WithTypePoolCache,AgentBuilder.PoolStrategy.WithTypePoolCache.Simple
- Enclosing interface:
AgentBuilder
public static interface AgentBuilder.PoolStrategy
A type locator allows to specify how
TypeDescriptions are resolved by an AgentBuilder.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA type locator that attempts loading a type if it cannot be located by the underlying lazy type pool.static enumA default type locator that resolves types only if any property that is not the type's name is requested.static enumA type locator that resolves all type descriptions eagerly.static classA type locator that uses type pools but allows for the configuration of a custom cache provider by class loader. -
Method Summary
Modifier and TypeMethodDescriptiontypePool(ClassFileLocator classFileLocator, ClassLoader classLoader) Creates a type pool for a given class file locator.typePool(ClassFileLocator classFileLocator, ClassLoader classLoader, String name) Creates a type pool for a given class file locator.
-
Method Details
-
typePool
Creates a type pool for a given class file locator.- Parameters:
classFileLocator- The class file locator to use.classLoader- The class loader for which the class file locator was created ornullif the boot loader.- Returns:
- A type pool for the supplied class file locator.
-
typePool
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.- Parameters:
classFileLocator- The class file locator to use.classLoader- The class loader for which the class file locator was created ornullif the boot loader.name- The name of the currently instrumented type.- Returns:
- A type pool for the supplied class file locator.
-