Package net.bytebuddy.asm
Enum Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue
- java.lang.Object
-
- java.lang.Enum<Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue>
-
- net.bytebuddy.asm.Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue>
,Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher
- Enclosing interface:
- Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher
public static enum Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue extends java.lang.Enum<Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue> implements Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher
A skip dispatcher where the instrumented method is skipped for any default value of the advice method's return type. If the return type isboolean
, the relationship is inversed, where the instrumented is skipped for atrue
return value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue.Inverted
An inverted version of a value-based skipped dispatcher that triggers upon observing a non-default value.-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher
Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.Disabled, Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForType, Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FOR_DOUBLE
A skip dispatcher for adouble
value.FOR_FLOAT
A skip dispatcher for afloat
value.FOR_INTEGER
A skip dispatcher for aboolean
,byte
,short
,char
orint
value.FOR_LONG
A skip dispatcher for along
value.FOR_REFERENCE
A skip dispatcher for a reference value.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
apply(org.objectweb.asm.MethodVisitor methodVisitor, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, MethodDescription instrumentedMethod, Advice.Dispatcher.Bound.SkipHandler skipHandler)
Applies this skip dispatcher.protected abstract void
convertValue(org.objectweb.asm.MethodVisitor methodVisitor, Advice.MethodSizeHandler.ForAdvice methodSizeHandler)
Converts the return value to anint
value.protected void
doApply(org.objectweb.asm.MethodVisitor methodVisitor, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, MethodDescription instrumentedMethod, Advice.Dispatcher.Bound.SkipHandler skipHandler, boolean inverted)
Applies this skip dispatcher.protected static Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher
of(TypeDefinition typeDefinition, boolean inverted)
Creates an appropriate skip dispatcher.static Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FOR_INTEGER
public static final Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue FOR_INTEGER
A skip dispatcher for aboolean
,byte
,short
,char
orint
value.
-
FOR_LONG
public static final Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue FOR_LONG
A skip dispatcher for along
value.
-
FOR_FLOAT
public static final Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue FOR_FLOAT
A skip dispatcher for afloat
value.
-
FOR_DOUBLE
public static final Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue FOR_DOUBLE
A skip dispatcher for adouble
value.
-
FOR_REFERENCE
public static final Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue FOR_REFERENCE
A skip dispatcher for a reference value.
-
-
Method Detail
-
values
public static Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue[] 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.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue c : Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue.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.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher.ForValue 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.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher of(TypeDefinition typeDefinition, boolean inverted)
Creates an appropriate skip dispatcher.- Parameters:
typeDefinition
- The type for which to skip a value.inverted
-true
if the skip condition should be inverted to trigger upon non-default values.- Returns:
- An appropriate skip dispatcher.
-
apply
public void apply(org.objectweb.asm.MethodVisitor methodVisitor, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, MethodDescription instrumentedMethod, Advice.Dispatcher.Bound.SkipHandler skipHandler)
Description copied from interface:Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher
Applies this skip dispatcher.- Specified by:
apply
in interfaceAdvice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher
- Parameters:
methodVisitor
- The method visitor to write to.methodSizeHandler
- The method size handler of the advice method to use.stackMapFrameHandler
- The stack map frame handler of the advice method to use.instrumentedMethod
- The instrumented method.skipHandler
- The skip handler to use.
-
doApply
protected void doApply(org.objectweb.asm.MethodVisitor methodVisitor, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, MethodDescription instrumentedMethod, Advice.Dispatcher.Bound.SkipHandler skipHandler, boolean inverted)
Applies this skip dispatcher.- Parameters:
methodVisitor
- The method visitor to write to.methodSizeHandler
- The method size handler of the advice method to use.stackMapFrameHandler
- The stack map frame handler of the advice method to use.instrumentedMethod
- The instrumented method.skipHandler
- The skip handler to use.inverted
-true
if the skip condition should be inverted.
-
convertValue
protected abstract void convertValue(org.objectweb.asm.MethodVisitor methodVisitor, Advice.MethodSizeHandler.ForAdvice methodSizeHandler)
Converts the return value to anint
value.- Parameters:
methodVisitor
- The method visitor to use.methodSizeHandler
- The method size handler of the advice method to use.
-
-