Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.ForFieldAccess.OfMatchedField
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.ForFieldAccess.OfMatchedField
- All Implemented Interfaces:
MemberSubstitution.Substitution.Factory
- Enclosing class:
MemberSubstitution.Substitution.ForFieldAccess
@Enhance
public static class MemberSubstitution.Substitution.ForFieldAccess.OfMatchedField
extends Object
implements MemberSubstitution.Substitution.Factory
A factory for a substitution that locates a field on the receiver type using a matcher.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ElementMatcher
<? super FieldDescription> The matcher to apply. -
Constructor Summary
ConstructorsConstructorDescriptionOfMatchedField
(ElementMatcher<? super FieldDescription> matcher) Creates a new substitution factory that locates a field by applying a matcher on the receiver type. -
Method Summary
Modifier and TypeMethodDescriptionmake
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool) Creates a substitution for an instrumented method.
-
Field Details
-
matcher
The matcher to apply.
-
-
Constructor Details
-
OfMatchedField
Creates a new substitution factory that locates a field by applying a matcher on the receiver type.- Parameters:
matcher
- The matcher to apply.
-
-
Method Details
-
make
public MemberSubstitution.Substitution make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool) Creates a substitution for an instrumented method.- Specified by:
make
in interfaceMemberSubstitution.Substitution.Factory
- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.typePool
- The type pool being used.- Returns:
- The substitution to apply within the instrumented method.
-