Package net.bytebuddy.agent.builder
Enum Class AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption
java.lang.Object
java.lang.Enum<AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption>
net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption
- All Implemented Interfaces:
Serializable
,Comparable<AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption>
,Constable
,AgentBuilder.RedefinitionStrategy.DiscoveryStrategy
- Enclosing class:
- AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating
static enum AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption
extends Enum<AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption>
implements AgentBuilder.RedefinitionStrategy.DiscoveryStrategy
A discovery strategy that simplifies the application of AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating
by assuming that the
loaded classes that are returned by Instrumentation.getAllLoadedClasses()
are always
returned in the same order.
Important: While this increases the performance of reiteration, it relies on an implementation detail of the JVM. Also, this strategy does not consider the possibility of classes being unloaded during reiteration. For these reasons, this strategy has to be used with care!
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
An iterable that reiterates over an array of loaded classes by the previously observed length.protected static class
An iterator that reiterates over an array of loaded classes by the previously observed length.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.RedefinitionStrategy.DiscoveryStrategy
AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Explicit, AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating, AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.SinglePass
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve
(Instrumentation instrumentation) Resolves an iterable of types to retransform.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
-
INSTANCE
public static final AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption INSTANCEThe singleton instance.
-
-
Constructor Details
-
WithSortOrderAssumption
private WithSortOrderAssumption()
-
-
Method Details
-
values
public static AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption[] 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
public static AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption valueOf(String name) 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
-
resolve
Resolves an iterable of types to retransform. Types might be loaded during a previous retransformation which might require multiple passes for a retransformation.- Specified by:
resolve
in interfaceAgentBuilder.RedefinitionStrategy.DiscoveryStrategy
- Parameters:
instrumentation
- The instrumentation instance used for the redefinition.- Returns:
- An iterable of types to consider for retransformation.
-