Package net.bytebuddy.asm
Enum Class Advice.StackMapFrameHandler.Default.TranslationMode
java.lang.Object
java.lang.Enum<Advice.StackMapFrameHandler.Default.TranslationMode>
net.bytebuddy.asm.Advice.StackMapFrameHandler.Default.TranslationMode
- All Implemented Interfaces:
Serializable
,Comparable<Advice.StackMapFrameHandler.Default.TranslationMode>
,Constable
- Enclosing class:
Advice.StackMapFrameHandler.Default
protected static enum Advice.StackMapFrameHandler.Default.TranslationMode
extends Enum<Advice.StackMapFrameHandler.Default.TranslationMode>
A translation mode that determines how the fixed frames of the instrumented method are written.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA translation mode that simply copies the original frames which are available when translating frames of the instrumented method.A translation mode for the enter advice that considers that thethis
reference might not be initialized for a constructor.A translation mode for an exit advice where thethis
reference is always initialized. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
copy
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, MethodDescription methodDescription, Object[] localVariable, Object[] translated) Copies the fixed parameters of the instrumented method onto the operand stack.protected abstract boolean
isPossibleThisFrameValue
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Object frame) Checks if a variable value in a stack map frame is a legal value for describing athis
reference.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
-
COPY
A translation mode that simply copies the original frames which are available when translating frames of the instrumented method. -
ENTER
A translation mode for the enter advice that considers that thethis
reference might not be initialized for a constructor. -
EXIT
A translation mode for an exit advice where thethis
reference is always initialized.
-
-
Constructor Details
-
TranslationMode
private TranslationMode()
-
-
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
-
copy
protected abstract int copy(TypeDescription instrumentedType, MethodDescription instrumentedMethod, MethodDescription methodDescription, Object[] localVariable, Object[] translated) Copies the fixed parameters of the instrumented method onto the operand stack.- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.methodDescription
- The method for which a frame is created.localVariable
- The original local variable array.translated
- The array containing the translated frames.- Returns:
- The amount of frames added to the translated frame array.
-
isPossibleThisFrameValue
protected abstract boolean isPossibleThisFrameValue(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Object frame) Checks if a variable value in a stack map frame is a legal value for describing athis
reference.- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.frame
- The frame value representing thethis
reference.- Returns:
true
if the value is a legal representation of thethis
reference.
-