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 howTypeDescription
s are resolved by anAgentBuilder
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AgentBuilder.PoolStrategy.ClassLoading
A type locator that attempts loading a type if it cannot be located by the underlying lazy type pool.static class
AgentBuilder.PoolStrategy.Default
A default type locator that resolves types only if any property that is not the type's name is requested.static class
AgentBuilder.PoolStrategy.Eager
A type locator that resolves all type descriptions eagerly.static class
AgentBuilder.PoolStrategy.WithTypePoolCache
A type locator that uses type pools but allows for the configuration of a custom cache provider by class loader.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TypePool
typePool(ClassFileLocator classFileLocator, java.lang.ClassLoader classLoader)
Creates a type pool for a given class file locator.TypePool
typePool(ClassFileLocator classFileLocator, java.lang.ClassLoader classLoader, java.lang.String name)
Creates a type pool for a given class file locator.
-
-
-
Method Detail
-
typePool
TypePool typePool(ClassFileLocator classFileLocator, java.lang.ClassLoader classLoader)
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.- Returns:
- A type pool for the supplied class file locator.
-
typePool
TypePool typePool(ClassFileLocator classFileLocator, java.lang.ClassLoader classLoader, java.lang.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.name
- The name of the currently instrumented type.- Returns:
- A type pool for the supplied class file locator.
-
-