@HashCodeAndEqualsPlugin.Enhance public static class MemberSubstitution.Substitution.ForMethodInvocation extends Object implements MemberSubstitution.Substitution
| Modifier and Type | Class and Description |
|---|---|
static interface |
MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver
A method resolver for locating a method for a substitute.
|
static class |
MemberSubstitution.Substitution.ForMethodInvocation.OfGivenMethod
A factory for a substitution that invokes a given method.
|
static class |
MemberSubstitution.Substitution.ForMethodInvocation.OfMatchedMethod
A factory for a substitution that locates a method on the receiver type using a matcher.
|
MemberSubstitution.Substitution.Chain, MemberSubstitution.Substitution.Factory, MemberSubstitution.Substitution.ForFieldAccess, MemberSubstitution.Substitution.ForMethodInvocation, MemberSubstitution.Substitution.ForValue, MemberSubstitution.Substitution.Stubbing| Constructor and Description |
|---|
ForMethodInvocation(TypeDescription instrumentedType,
MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver methodResolver)
Creates a new method-resolving substitution.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation |
resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
int freeOffset)
Resolves this substitution into a stack manipulation.
|
public ForMethodInvocation(TypeDescription instrumentedType, MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver methodResolver)
instrumentedType - The instrumented type.methodResolver - The method resolver to use.public StackManipulation resolve(TypeDescription receiver, ByteCodeElement.Member original, TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, int freeOffset)
resolve in interface MemberSubstitution.Substitutionreceiver - The target type on which a member is accessed.original - The field, method or constructor that is substituted.parameters - All parameters that serve as input to this access.result - The result that is expected from the interaction or void if no result is expected.methodHandle - A method handle describing the substituted expression.stackManipulation - The original byte code expression that is being executed.freeOffset - The first free offset of the local variable array that can be used for storing values.Copyright © 2014–2023. All rights reserved.