Class MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver.Matching
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver.Matching
- All Implemented Interfaces:
MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver
- Enclosing interface:
MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver
@Enhance
public static class MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver.Matching
extends Object
implements MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver
A method resolver that locates a non-static method by locating it from the receiver type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver
MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver.Matching, MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver.Simple -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDescriptionThe instrumented type.private final ElementMatcher<? super MethodDescription> The matcher to use for locating the method to substitute with.private final MethodGraph.CompilerThe method graph compiler to use. -
Constructor Summary
ConstructorsConstructorDescriptionMatching(TypeDescription instrumentedType, MethodGraph.Compiler methodGraphCompiler, ElementMatcher<? super MethodDescription> matcher) Creates a new matching method resolver. -
Method Summary
Modifier and TypeMethodDescriptionresolve(MemberSubstitution.Target target, TypeList.Generic parameters, TypeDescription.Generic result) Resolves the method to substitute with.
-
Field Details
-
instrumentedType
The instrumented type. -
methodGraphCompiler
The method graph compiler to use. -
matcher
The matcher to use for locating the method to substitute with.
-
-
Constructor Details
-
Matching
public Matching(TypeDescription instrumentedType, MethodGraph.Compiler methodGraphCompiler, ElementMatcher<? super MethodDescription> matcher) Creates a new matching method resolver.- Parameters:
instrumentedType- The instrumented type.methodGraphCompiler- The method graph compiler to use.matcher- The matcher to use for locating the method to substitute with.
-
-
Method Details
-
resolve
public MethodDescription resolve(MemberSubstitution.Target target, TypeList.Generic parameters, TypeDescription.Generic result) Resolves the method to substitute with.- Specified by:
resolvein interfaceMemberSubstitution.Substitution.ForMethodInvocation.MethodResolver- Parameters:
target- The target member of invokedynamic invocation.parameters- All parameters that serve as input to this access.result- The result that is expected from the interaction orvoidif no result is expected.- Returns:
- The field to substitute with.
-