Package net.bytebuddy.asm
Enum Advice.OffsetMapping.Context.ForMethodExit
- java.lang.Object
-
- java.lang.Enum<Advice.OffsetMapping.Context.ForMethodExit>
-
- net.bytebuddy.asm.Advice.OffsetMapping.Context.ForMethodExit
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Advice.OffsetMapping.Context.ForMethodExit>
,Advice.OffsetMapping.Context
- Enclosing interface:
- Advice.OffsetMapping.Context
public static enum Advice.OffsetMapping.Context.ForMethodExit extends java.lang.Enum<Advice.OffsetMapping.Context.ForMethodExit> implements Advice.OffsetMapping.Context
A context for an offset mapping describing a method exit.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.OffsetMapping.Context
Advice.OffsetMapping.Context.ForMethodEntry, Advice.OffsetMapping.Context.ForMethodExit
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPadding()
Returns the padding before writing additional values that this context applies.boolean
isInitialized()
Returnstrue
if the advice is applied on a fully initialized instance, i.e.protected static Advice.OffsetMapping.Context
of(TypeDefinition typeDescription)
Resolves an appropriate method exit context for the supplied entry method type.static Advice.OffsetMapping.Context.ForMethodExit
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Advice.OffsetMapping.Context.ForMethodExit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ZERO
public static final Advice.OffsetMapping.Context.ForMethodExit ZERO
A method exit with a zero sized padding.
-
SINGLE
public static final Advice.OffsetMapping.Context.ForMethodExit SINGLE
A method exit with a single slot padding.
-
DOUBLE
public static final Advice.OffsetMapping.Context.ForMethodExit DOUBLE
A method exit with a double slot padding.
-
-
Method Detail
-
values
public static Advice.OffsetMapping.Context.ForMethodExit[] 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.Context.ForMethodExit c : Advice.OffsetMapping.Context.ForMethodExit.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.Context.ForMethodExit 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
-
of
protected static Advice.OffsetMapping.Context of(TypeDefinition typeDescription)
Resolves an appropriate method exit context for the supplied entry method type.- Parameters:
typeDescription
- The type that is returned by the enter method.- Returns:
- An appropriate context for the supplied entry method type.
-
isInitialized
public boolean isInitialized()
Description copied from interface:Advice.OffsetMapping.Context
Returnstrue
if the advice is applied on a fully initialized instance, i.e. describes if thethis
instance is available or still uninitialized during calling the advice.- Specified by:
isInitialized
in interfaceAdvice.OffsetMapping.Context
- Returns:
true
if the advice is applied onto a fully initialized method.
-
getPadding
public int getPadding()
Description copied from interface:Advice.OffsetMapping.Context
Returns the padding before writing additional values that this context applies.- Specified by:
getPadding
in interfaceAdvice.OffsetMapping.Context
- Returns:
- The required padding for this context.
-
-