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
TypeDescription
s are resolved by an AgentBuilder
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
A type locator that attempts loading a type if it cannot be located by the underlying lazy type pool.static enum
A default type locator that resolves types only if any property that is not the type's name is requested.static enum
A type locator that resolves all type descriptions eagerly.static class
A 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 ornull
if 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 ornull
if the boot loader.name
- The name of the currently instrumented type.- Returns:
- A type pool for the supplied class file locator.
-