Enum Class AgentBuilder.TypeStrategy.Default
- All Implemented Interfaces:
Serializable
,Comparable<AgentBuilder.TypeStrategy.Default>
,Constable
,AgentBuilder.TypeStrategy
- Enclosing interface:
- AgentBuilder.TypeStrategy
-
Nested Class Summary
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.TypeStrategy
AgentBuilder.TypeStrategy.Default, AgentBuilder.TypeStrategy.ForBuildEntryPoint
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA definition handler that performs a decoration of declared methods only.A definition handler that performs a rebasing for all types.A definition handler that performs a redefinition for all types.A definition handler that performs a redefinition for all types and ignores all methods that were not declared by the instrumented type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static AgentBuilder.TypeStrategy.Default[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface net.bytebuddy.agent.builder.AgentBuilder.TypeStrategy
builder
-
Enum Constant Details
-
REBASE
A definition handler that performs a rebasing for all types. -
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
orAgentBuilder.InitializationStrategy.NoOp
. Also, consider the constraints implied byByteBuddy.redefine(TypeDescription, ClassFileLocator)
.For prohibiting any changes on a class file, use
AgentBuilder.disableClassFormatChanges()
-
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
orAgentBuilder.InitializationStrategy.NoOp
. Also, consider the constraints implied byByteBuddy.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()
-
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 applyingAsmVisitorWrapper
s 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
orAgentBuilder.InitializationStrategy.NoOp
. Also, consider the constraints implied byByteBuddy.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()
-
-
Constructor Details
-
Default
private Default()
-
-
Method Details
-
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
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
-