Package net.bytebuddy.agent.builder
Enum Class AgentBuilder.PoolStrategy.ClassLoading
java.lang.Object
java.lang.Enum<AgentBuilder.PoolStrategy.ClassLoading>
net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy.ClassLoading
- All Implemented Interfaces:
Serializable
,Comparable<AgentBuilder.PoolStrategy.ClassLoading>
,Constable
,AgentBuilder.PoolStrategy
- Enclosing interface:
- AgentBuilder.PoolStrategy
public static enum AgentBuilder.PoolStrategy.ClassLoading
extends Enum<AgentBuilder.PoolStrategy.ClassLoading>
implements AgentBuilder.PoolStrategy
A type locator that attempts loading a type if it cannot be located by the underlying lazy type pool.
The returned type pool uses a TypePool.CacheProvider.Simple
and the
ClassFileLocator
that is provided by the builder's AgentBuilder.LocationStrategy
. Any types
are loaded via the instrumented type's ClassLoader
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy
AgentBuilder.PoolStrategy.ClassLoading, AgentBuilder.PoolStrategy.Default, AgentBuilder.PoolStrategy.Eager, AgentBuilder.PoolStrategy.WithTypePoolCache
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA type locator that parses the code segment of each method for extracting information about parameter names even if they are not explicitly included in a class file.A type locator that skips the code segment of each method and does therefore not extract information about parameter names. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypePool.Default.ReaderMode
The reader mode to apply by this type locator. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ClassLoading
(TypePool.Default.ReaderMode readerMode) Creates a new type locator. -
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.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXTENDED
A type locator that parses the code segment of each method for extracting information about parameter names even if they are not explicitly included in a class file.- See Also:
-
FAST
A type locator that skips the code segment of each method and does therefore not extract information about parameter names. Parameter names are still included if they are explicitly included in a class file.- See Also:
-
-
Field Details
-
readerMode
The reader mode to apply by this type locator.
-
-
Constructor Details
-
ClassLoading
Creates a new type locator.- Parameters:
readerMode
- The reader mode to apply by this type locator.
-
-
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
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 nameNullPointerException
- if the argument is null
-
typePool
Creates a type pool for a given class file locator.- Specified by:
typePool
in interfaceAgentBuilder.PoolStrategy
- 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
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 interfaceAgentBuilder.PoolStrategy
- 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.
-