Package net.bytebuddy.asm
Enum Advice.StackMapFrameHandler.Default.TranslationMode
- java.lang.Object
-
- java.lang.Enum<Advice.StackMapFrameHandler.Default.TranslationMode>
-
- net.bytebuddy.asm.Advice.StackMapFrameHandler.Default.TranslationMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Advice.StackMapFrameHandler.Default.TranslationMode>
- Enclosing class:
- Advice.StackMapFrameHandler.Default
protected static enum Advice.StackMapFrameHandler.Default.TranslationMode extends java.lang.Enum<Advice.StackMapFrameHandler.Default.TranslationMode>
A translation mode that determines how the fixed frames of the instrumented method are written.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description 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 Summary
Constructors Modifier Constructor Description private
TranslationMode()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract int
copy(TypeDescription instrumentedType, MethodDescription instrumentedMethod, MethodDescription methodDescription, java.lang.Object[] localVariable, java.lang.Object[] translated)
Copies the fixed parameters of the instrumented method onto the operand stack.protected abstract boolean
isPossibleThisFrameValue(TypeDescription instrumentedType, MethodDescription instrumentedMethod, java.lang.Object frame)
Checks if a variable value in a stack map frame is a legal value for describing athis
reference.static Advice.StackMapFrameHandler.Default.TranslationMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Advice.StackMapFrameHandler.Default.TranslationMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COPY
public static final Advice.StackMapFrameHandler.Default.TranslationMode COPY
A translation mode that simply copies the original frames which are available when translating frames of the instrumented method.
-
ENTER
public static final Advice.StackMapFrameHandler.Default.TranslationMode ENTER
A translation mode for the enter advice that considers that thethis
reference might not be initialized for a constructor.
-
EXIT
public static final Advice.StackMapFrameHandler.Default.TranslationMode EXIT
A translation mode for an exit advice where thethis
reference is always initialized.
-
-
Method Detail
-
values
public static Advice.StackMapFrameHandler.Default.TranslationMode[] 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 (Advice.StackMapFrameHandler.Default.TranslationMode c : Advice.StackMapFrameHandler.Default.TranslationMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Advice.StackMapFrameHandler.Default.TranslationMode 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
-
copy
protected abstract int copy(TypeDescription instrumentedType, MethodDescription instrumentedMethod, MethodDescription methodDescription, java.lang.Object[] localVariable, java.lang.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, java.lang.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.
-
-