public static enum AgentBuilder.TypeStrategy.Default extends Enum<AgentBuilder.TypeStrategy.Default> implements AgentBuilder.TypeStrategy
AgentBuilder.TypeStrategy.Default, AgentBuilder.TypeStrategy.ForBuildEntryPoint| Enum Constant and Description |
|---|
DECORATE
A definition handler that performs a decoration of declared methods only.
|
REBASE
A definition handler that performs a rebasing for all types.
|
REDEFINE
A definition handler that performs a redefinition for all types.
|
REDEFINE_FROZEN
A definition handler that performs a redefinition for all types and ignores all methods that were not declared by the instrumented type.
|
| Modifier and Type | Method and Description |
|---|---|
static AgentBuilder.TypeStrategy.Default |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AgentBuilder.TypeStrategy.Default[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfbuilderpublic static final AgentBuilder.TypeStrategy.Default REBASE
public static final AgentBuilder.TypeStrategy.Default REDEFINE
A definition handler that performs a redefinition for all types.
Note that the default agent builder is configured to apply a self initialization where a static class initializer
is added to the redefined class. This can be disabled by for example using a AgentBuilder.InitializationStrategy.Minimal or
AgentBuilder.InitializationStrategy.NoOp. Also, consider the constraints implied by ByteBuddy.redefine(TypeDescription, ClassFileLocator).
For prohibiting any changes on a class file, use AgentBuilder.disableClassFormatChanges()
public static final AgentBuilder.TypeStrategy.Default REDEFINE_FROZEN
A definition handler that performs a redefinition for all types and ignores all methods that were not declared by the instrumented type.
Note that the default agent builder is configured to apply a self initialization where a static class initializer
is added to the redefined class. This can be disabled by for example using a AgentBuilder.InitializationStrategy.Minimal or
AgentBuilder.InitializationStrategy.NoOp. Also, consider the constraints implied by ByteBuddy.redefine(TypeDescription, ClassFileLocator).
Using this strategy also configures Byte Buddy to create frozen instrumented types and discards any explicit configuration.
For prohibiting any changes on a class file, use AgentBuilder.disableClassFormatChanges()
public static final AgentBuilder.TypeStrategy.Default DECORATE
A definition handler that performs a decoration of declared methods only. Using this type strategy
implies the limitations that are described by ByteBuddy.decorate(TypeDescription, ClassFileLocator).
This type strategy can be useful when only applying AsmVisitorWrappers without attempting to change
the class file layout..
Note that the default agent builder is configured to apply a self initialization where a static class initializer
is added to the redefined class. This can be disabled by for example using a AgentBuilder.InitializationStrategy.Minimal or
AgentBuilder.InitializationStrategy.NoOp. Also, consider the constraints implied by ByteBuddy.redefine(TypeDescription, ClassFileLocator).
Using this strategy also configures Byte Buddy to create frozen instrumented types and discards any explicit configuration.
For prohibiting any changes on a class file, use AgentBuilder.disableClassFormatChanges()
public static AgentBuilder.TypeStrategy.Default[] values()
for (AgentBuilder.TypeStrategy.Default c : AgentBuilder.TypeStrategy.Default.values()) System.out.println(c);
public static AgentBuilder.TypeStrategy.Default 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 nullCopyright © 2014–2025. All rights reserved.