Package net.bytebuddy.asm
Enum Advice.OffsetMapping.Sort
- All Implemented Interfaces:
Serializable
,Comparable<Advice.OffsetMapping.Sort>
,java.lang.constant.Constable
- Enclosing interface:
Advice.OffsetMapping
Describes the sort of the executed advice.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
isPremature
(MethodDescription methodDescription) Checks if an advice is executed in a premature state, i.e.static Advice.OffsetMapping.Sort
Returns the enum constant of this type with the specified name.static Advice.OffsetMapping.Sort[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ENTER
Indicates that an offset is mapped for an enter advice. -
EXIT
Indicates that an offset is mapped for an exit advice.
-
-
Constructor Details
-
Sort
private Sort()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isPremature
Checks if an advice is executed in a premature state, i.e. the instrumented method is a constructor where the super constructor is not yet invoked. In this case, thethis
reference is not yet initialized and therefore not available.- Parameters:
methodDescription
- The instrumented method.- Returns:
true
if the advice is executed premature for the instrumented method.
-