@HashCodeAndEqualsPlugin.Enhance public static class MemberSubstitution.Substitution.ForFieldAccess.FieldResolver.ForElementMatcher extends Object implements MemberSubstitution.Substitution.ForFieldAccess.FieldResolver
MemberSubstitution.Substitution.ForFieldAccess.FieldResolver.ForElementMatcher, MemberSubstitution.Substitution.ForFieldAccess.FieldResolver.Simple
Modifier | Constructor and Description |
---|---|
protected |
ForElementMatcher(TypeDescription instrumentedType,
ElementMatcher<? super FieldDescription> matcher)
Creates a new field resolver that locates a field on the receiver type using a matcher.
|
Modifier and Type | Method and Description |
---|---|
FieldDescription |
resolve(TypeDescription targetType,
ByteCodeElement target,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the field to substitute with.
|
protected ForElementMatcher(TypeDescription instrumentedType, ElementMatcher<? super FieldDescription> matcher)
instrumentedType
- The instrumented type.matcher
- The matcher to use for locating the field to substitute with.public FieldDescription resolve(TypeDescription targetType, ByteCodeElement target, TypeList.Generic parameters, TypeDescription.Generic result)
resolve
in interface MemberSubstitution.Substitution.ForFieldAccess.FieldResolver
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.Copyright © 2014–2021. All rights reserved.