public static enum AgentBuilder.RedefinitionStrategy extends Enum<AgentBuilder.RedefinitionStrategy>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
AgentBuilder.RedefinitionStrategy.Collector
A collector is responsible for collecting classes that are to be considered for modification.
|
| Enum Constant and Description |
|---|
DISABLED
Disables redefinition such that already loaded classes are not affected by the agent.
|
REDEFINITION
Applies a redefinition to all classes that are already loaded and that would have been transformed if
the built agent was registered before they were loaded.
|
RETRANSFORMATION
Applies a retransformation to all classes that are already loaded and that would have been transformed if
the built agent was registered before they were loaded.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isEnabled()
Indicates that this redefinition strategy applies a modification of already loaded classes.
|
protected abstract boolean |
isRetransforming(Instrumentation instrumentation)
Indicates if this strategy requires a class file transformer to be registered with a hint to apply the
transformer for retransformation.
|
protected abstract AgentBuilder.RedefinitionStrategy.Collector |
makeCollector(AgentBuilder.Default.Transformation transformation)
Creates a collector instance that is responsible for collecting loaded classes for potential retransformation.
|
String |
toString() |
static AgentBuilder.RedefinitionStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AgentBuilder.RedefinitionStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AgentBuilder.RedefinitionStrategy DISABLED
public static final AgentBuilder.RedefinitionStrategy REDEFINITION
Applies a redefinition to all classes that are already loaded and that would have been transformed if the built agent was registered before they were loaded.
Important: If a redefined class was previously instrumented, this instrumentation information is lost
during the instrumentation. The redefinition is applied upon the original byte code that is provided by a class
loader and not upon the code in its currently transformed format. Use
RETRANSFORMATION if this is a factual or
potential limitation.
public static final AgentBuilder.RedefinitionStrategy RETRANSFORMATION
public static AgentBuilder.RedefinitionStrategy[] values()
for (AgentBuilder.RedefinitionStrategy c : AgentBuilder.RedefinitionStrategy.values()) System.out.println(c);
public static AgentBuilder.RedefinitionStrategy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullprotected abstract boolean isRetransforming(Instrumentation instrumentation)
instrumentation - The instrumentation instance used.true if a class file transformer must be registered with a hint for retransformation.protected boolean isEnabled()
true if this redefinition strategy applies a modification of already loaded classes.protected abstract AgentBuilder.RedefinitionStrategy.Collector makeCollector(AgentBuilder.Default.Transformation transformation)
transformation - The transformation that is registered for the agent.public String toString()
toString in class Enum<AgentBuilder.RedefinitionStrategy>Copyright © 2014–2015. All rights reserved.