Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForDynamicInvocation
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForDynamicInvocation
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher
- Enclosing interface:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher
@Enhance
public static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForDynamicInvocation
extends Object
implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher
A method dispatcher that is using a dynamic method invocation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A factory for a dynamic method invocation of the dispatcher method or constructor.protected static class
A resolved dispatcher for a dynamically bound method invocation.Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher
MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForDynamicInvocation, MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForRegularInvocation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDescription.InDefinedShape
The bootstrap method.private final MethodDescription.InDefinedShape
The delegation method.A resolver for supplying arguments to the bootstrap method. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForDynamicInvocation
(MethodDescription.InDefinedShape bootstrapMethod, MethodDescription.InDefinedShape delegate, MemberSubstitution.Substitution.Chain.Step.ForDelegation.BootstrapArgumentResolver resolver) Creates a dispatcher for a dynamic method invocation. -
Method Summary
Modifier and TypeMethodDescriptionof
(MethodDescription.InDefinedShape bootstrapMethod, MemberSubstitution.Substitution.Chain.Step.ForDelegation.BootstrapArgumentResolver.Factory resolverFactory) Creates a dispatcher factory for a dynamic method invocation.resolve
(TypeDescription instrumentedType, MethodDescription instrumentedMethod) Resolves a dispatcher for a given instrumented type and method.
-
Field Details
-
bootstrapMethod
The bootstrap method. -
delegate
The delegation method. -
resolver
private final MemberSubstitution.Substitution.Chain.Step.ForDelegation.BootstrapArgumentResolver resolverA resolver for supplying arguments to the bootstrap method.
-
-
Constructor Details
-
ForDynamicInvocation
protected ForDynamicInvocation(MethodDescription.InDefinedShape bootstrapMethod, MethodDescription.InDefinedShape delegate, MemberSubstitution.Substitution.Chain.Step.ForDelegation.BootstrapArgumentResolver resolver) Creates a dispatcher for a dynamic method invocation.- Parameters:
bootstrapMethod
- The bootstrap method.delegate
- The delegation method.resolver
- A resolver for supplying arguments to the bootstrap method.
-
-
Method Details
-
of
protected static MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.Factory of(MethodDescription.InDefinedShape bootstrapMethod, MemberSubstitution.Substitution.Chain.Step.ForDelegation.BootstrapArgumentResolver.Factory resolverFactory) Creates a dispatcher factory for a dynamic method invocation.- Parameters:
bootstrapMethod
- The bootstrap method.resolverFactory
- A resolver for supplying arguments to the bootstrap method.- Returns:
- An appropriate dispatcher factory.
-
resolve
public MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.Resolved resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod) Resolves a dispatcher for a given instrumented type and method.- Specified by:
resolve
in interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher
- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.- Returns:
- A resolved version of this dispatcher.
-