Package net.bytebuddy.asm
Class Advice.Delegator.ForDynamicInvocation
- java.lang.Object
-
- net.bytebuddy.asm.Advice.Delegator.ForDynamicInvocation
-
- All Implemented Interfaces:
Advice.Delegator
- Enclosing interface:
- Advice.Delegator
@Enhance public static class Advice.Delegator.ForDynamicInvocation extends java.lang.Object implements Advice.Delegator
Invokes an advice method using a dynamic method call.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Delegator
Advice.Delegator.ForDynamicInvocation, Advice.Delegator.ForStaticInvocation
-
-
Field Summary
Fields Modifier and Type Field Description private MethodDescription.InDefinedShape
bootstrapMethod
The bootstrap method.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForDynamicInvocation(MethodDescription.InDefinedShape bootstrapMethod)
Creates a delegator for a dynamic method invocation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(org.objectweb.asm.MethodVisitor methodVisitor, MethodDescription.InDefinedShape adviceMethod, TypeDescription instrumentedType, MethodDescription instrumentedMethod, boolean exit)
Materializes an invocation.protected static Advice.Delegator
of(MethodDescription.InDefinedShape bootstrapMethod)
Creates a new dynamic invocation delegator.
-
-
-
Field Detail
-
bootstrapMethod
private final MethodDescription.InDefinedShape bootstrapMethod
The bootstrap method.
-
-
Constructor Detail
-
ForDynamicInvocation
protected ForDynamicInvocation(MethodDescription.InDefinedShape bootstrapMethod)
Creates a delegator for a dynamic method invocation.- Parameters:
bootstrapMethod
- The bootstrap method.
-
-
Method Detail
-
of
protected static Advice.Delegator of(MethodDescription.InDefinedShape bootstrapMethod)
Creates a new dynamic invocation delegator.- Parameters:
bootstrapMethod
- The bootstrap method or constructor.- Returns:
- An appropriate delegator.
-
apply
public void apply(org.objectweb.asm.MethodVisitor methodVisitor, MethodDescription.InDefinedShape adviceMethod, TypeDescription instrumentedType, MethodDescription instrumentedMethod, boolean exit)
Materializes an invocation.- Specified by:
apply
in interfaceAdvice.Delegator
- Parameters:
methodVisitor
- The method visitor to apply the materialization to.adviceMethod
- The advice method to materialize.instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.exit
-true
if the materialization is exit advice.
-
-