@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.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 targetType,
ByteCodeElement target,
TypeList.Generic parameters,
TypeDescription.Generic result,
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 targetType, ByteCodeElement target, TypeList.Generic parameters, TypeDescription.Generic result, int freeOffset)
resolve
in interface MemberSubstitution.Substitution
targetType
- The target type on which a member is accessed.target
- The target 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.freeOffset
- The first free offset of the local variable array that can be used for storing values.Copyright © 2014–2019. All rights reserved.