Package net.bytebuddy.asm
Enum Advice.OffsetMapping.Context.ForMethodEntry
- java.lang.Object
-
- java.lang.Enum<Advice.OffsetMapping.Context.ForMethodEntry>
-
- net.bytebuddy.asm.Advice.OffsetMapping.Context.ForMethodEntry
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Advice.OffsetMapping.Context.ForMethodEntry>
,Advice.OffsetMapping.Context
- Enclosing interface:
- Advice.OffsetMapping.Context
public static enum Advice.OffsetMapping.Context.ForMethodEntry extends java.lang.Enum<Advice.OffsetMapping.Context.ForMethodEntry> implements Advice.OffsetMapping.Context
A context for an offset mapping describing a method entry.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.OffsetMapping.Context
Advice.OffsetMapping.Context.ForMethodEntry, Advice.OffsetMapping.Context.ForMethodExit
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INITIALIZED
Describes a context for a method entry that is not a constructor.NON_INITIALIZED
Describes a context for a method entry that is a constructor.
-
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(MethodDescription instrumentedMethod)
Resolves an appropriate method entry context for the supplied instrumented method.static Advice.OffsetMapping.Context.ForMethodEntry
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Advice.OffsetMapping.Context.ForMethodEntry[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INITIALIZED
public static final Advice.OffsetMapping.Context.ForMethodEntry INITIALIZED
Describes a context for a method entry that is not a constructor.
-
NON_INITIALIZED
public static final Advice.OffsetMapping.Context.ForMethodEntry NON_INITIALIZED
Describes a context for a method entry that is a constructor.
-
-
Method Detail
-
values
public static Advice.OffsetMapping.Context.ForMethodEntry[] 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.ForMethodEntry c : Advice.OffsetMapping.Context.ForMethodEntry.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.ForMethodEntry 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(MethodDescription instrumentedMethod)
Resolves an appropriate method entry context for the supplied instrumented method.- Parameters:
instrumentedMethod
- The instrumented method.- Returns:
- An appropriate context.
-
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.
-
-