Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForRegularInvocation
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForRegularInvocation
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher
,MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.Resolved
- Enclosing interface:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher
@Enhance
public static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForRegularInvocation
extends Object
implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher, MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.Resolved
A dispatcher that invokes a delegate method directly.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enum
A factory for creating a dispatcher for a regular 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, MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.Resolved
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForRegularInvocation
(MethodDescription delegate) Creates a dispatcher for a regular method invocation. -
Method Summary
Modifier and TypeMethodDescriptionapply
(TypeDescription receiver, ByteCodeElement.Member original, JavaConstant.MethodHandle methodHandle) Creates a stack manipulation for a given substitution target.resolve
(TypeDescription instrumentedType, MethodDescription instrumentedMethod) Resolves a dispatcher for a given instrumented type and method.
-
Field Details
-
delegate
The delegation method.
-
-
Constructor Details
-
ForRegularInvocation
Creates a dispatcher for a regular method invocation.- Parameters:
delegate
- The delegation method.
-
-
Method Details
-
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.
-
initialize
- Specified by:
initialize
in interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.Resolved
-
apply
public StackManipulation apply(TypeDescription receiver, ByteCodeElement.Member original, JavaConstant.MethodHandle methodHandle) Creates a stack manipulation for a given substitution target.- Specified by:
apply
in interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.Resolved
- Parameters:
receiver
- The type upon which the substituted element is invoked upon.original
- The substituted element.methodHandle
- A method handle that describes the invocation.- Returns:
- A stack manipulation that executes the represented delegation.
-