Package net.bytebuddy.asm
Enum Advice.OffsetMapping.Sort
- java.lang.Object
-
- java.lang.Enum<Advice.OffsetMapping.Sort>
-
- net.bytebuddy.asm.Advice.OffsetMapping.Sort
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Advice.OffsetMapping.Sort>
- Enclosing interface:
- Advice.OffsetMapping
public static enum Advice.OffsetMapping.Sort extends java.lang.Enum<Advice.OffsetMapping.Sort>
Describes the sort of the executed advice.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Sort()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
isPremature(MethodDescription methodDescription)
Checks if an advice is executed in a premature state, i.e.static Advice.OffsetMapping.Sort
valueOf(java.lang.String name)
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 Detail
-
ENTER
public static final Advice.OffsetMapping.Sort ENTER
Indicates that an offset is mapped for an enter advice.
-
EXIT
public static final Advice.OffsetMapping.Sort EXIT
Indicates that an offset is mapped for an exit advice.
-
-
Method Detail
-
values
public static Advice.OffsetMapping.Sort[] 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.OffsetMapping.Sort c : Advice.OffsetMapping.Sort.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.OffsetMapping.Sort 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
-
isPremature
public abstract boolean isPremature(MethodDescription methodDescription)
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.
-
-