Package net.bytebuddy.agent.builder
Enum 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:
java.io.Serializable
,java.lang.Comparable<AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption>
,AgentBuilder.RedefinitionStrategy.DiscoveryStrategy
- Enclosing class:
- AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating
static enum AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption extends java.lang.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 byInstrumentation.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 Classes Modifier and Type Class Description protected static class
AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption.OrderedReiteratingIterable
An iterable that reiterates over an array of loaded classes by the previously observed length.protected static class
AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption.OrderedReiteratingIterator
An iterator that reiterates over an array of loaded classes by the previously observed length.-
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 Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
WithSortOrderAssumption()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<java.lang.Iterable<java.lang.Class<?>>>
resolve(java.lang.instrument.Instrumentation instrumentation)
Resolves an iterable of types to retransform.static AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption[] 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.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption c : AgentBuilder.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption.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.RedefinitionStrategy.DiscoveryStrategy.Reiterating.WithSortOrderAssumption 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
-
resolve
public java.lang.Iterable<java.lang.Iterable<java.lang.Class<?>>> resolve(java.lang.instrument.Instrumentation instrumentation)
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.
-
-