Package net.bytebuddy.agent.builder
Enum AgentBuilder.PoolStrategy.ExtraLazy
- java.lang.Object
-
- java.lang.Enum<AgentBuilder.PoolStrategy.ExtraLazy>
-
- net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy.ExtraLazy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AgentBuilder.PoolStrategy.ExtraLazy>,AgentBuilder.PoolStrategy
- Enclosing interface:
- AgentBuilder.PoolStrategy
public static enum AgentBuilder.PoolStrategy.ExtraLazy extends java.lang.Enum<AgentBuilder.PoolStrategy.ExtraLazy> implements AgentBuilder.PoolStrategy
A default type locator that resolves types only if any property that is not the type's name is requested. Additionally, the class file of a class is only parsed when a property that is not the modifiers, the super class or the interface types is requeste.
The returned type pool uses a
TypePool.CacheProvider.Simpleand theClassFileLocatorthat is provided by the builder'sAgentBuilder.LocationStrategy.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.PoolStrategy
AgentBuilder.PoolStrategy.ClassLoading, AgentBuilder.PoolStrategy.Default, AgentBuilder.PoolStrategy.Eager, AgentBuilder.PoolStrategy.ExtraLazy, AgentBuilder.PoolStrategy.WithTypePoolCache
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EXTENDEDA 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.FASTA type locator that skips the code segment of each method and does therefore not extract information about parameter names.
-
Field Summary
Fields Modifier and Type Field Description private TypePool.Default.ReaderModereaderModeThe reader mode to apply by this type locator.
-
Constructor Summary
Constructors Modifier Constructor Description privateExtraLazy(TypePool.Default.ReaderMode readerMode)Creates a new type locator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TypePooltypePool(ClassFileLocator classFileLocator, java.lang.ClassLoader classLoader)Creates a type pool for a given class file locator.TypePooltypePool(ClassFileLocator classFileLocator, java.lang.ClassLoader classLoader, java.lang.String name)Creates a type pool for a given class file locator.static AgentBuilder.PoolStrategy.ExtraLazyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static AgentBuilder.PoolStrategy.ExtraLazy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXTENDED
public static final AgentBuilder.PoolStrategy.ExtraLazy 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:
TypePool.Default.ReaderMode.EXTENDED
-
FAST
public static final AgentBuilder.PoolStrategy.ExtraLazy 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:
TypePool.Default.ReaderMode.FAST
-
-
Field Detail
-
readerMode
private final TypePool.Default.ReaderMode readerMode
The reader mode to apply by this type locator.
-
-
Constructor Detail
-
ExtraLazy
private ExtraLazy(TypePool.Default.ReaderMode readerMode)
Creates a new type locator.- Parameters:
readerMode- The reader mode to apply by this type locator.
-
-
Method Detail
-
values
public static AgentBuilder.PoolStrategy.ExtraLazy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AgentBuilder.PoolStrategy.ExtraLazy c : AgentBuilder.PoolStrategy.ExtraLazy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AgentBuilder.PoolStrategy.ExtraLazy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
typePool
public TypePool typePool(ClassFileLocator classFileLocator, @MaybeNull java.lang.ClassLoader classLoader)
Creates a type pool for a given class file locator.- Specified by:
typePoolin interfaceAgentBuilder.PoolStrategy- 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
public TypePool typePool(ClassFileLocator classFileLocator, @MaybeNull 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.- Specified by:
typePoolin interfaceAgentBuilder.PoolStrategy- 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.
-
-