Package net.bytebuddy.asm
Class Advice.Delegator.ForRegularInvocation
java.lang.Object
net.bytebuddy.asm.Advice.Delegator.ForRegularInvocation
- All Implemented Interfaces:
Advice.Delegator
- Enclosing interface:
Advice.Delegator
@Enhance
public static class Advice.Delegator.ForRegularInvocation
extends Object
implements Advice.Delegator
Invokes an advice method using a regular method call.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumA factory for a regular method invocation delegator.Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Delegator
Advice.Delegator.ForDynamicInvocation, Advice.Delegator.ForRegularInvocation -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDescription.InDefinedShapeThe advice method. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForRegularInvocation(MethodDescription.InDefinedShape adviceMethod) Creates a delegator for a regular invocation. -
Method Summary
Modifier and TypeMethodDescriptionapply(TypeDescription instrumentedType, MethodDescription instrumentedMethod) Materializes an invocation.
-
Field Details
-
adviceMethod
The advice method.
-
-
Constructor Details
-
ForRegularInvocation
Creates a delegator for a regular invocation.- Parameters:
adviceMethod- The advice method.
-
-
Method Details
-
apply
public StackManipulation apply(TypeDescription instrumentedType, MethodDescription instrumentedMethod) Materializes an invocation.- Specified by:
applyin interfaceAdvice.Delegator- Parameters:
instrumentedType- The instrumented type.instrumentedMethod- The instrumented method.- Returns:
- An appropriate stack manipulation which needs to consume all arguments for the advice method and needs to provide a compatible return type.
-