Package net.bytebuddy.asm
Interface MemberSubstitution.Replacement
-
- All Known Implementing Classes:
MemberSubstitution.Replacement.ForElementMatchers
,MemberSubstitution.Replacement.ForFirstBinding
,MemberSubstitution.Replacement.NoOp
- Enclosing class:
- MemberSubstitution
protected static interface MemberSubstitution.Replacement
A replacement combines aMemberSubstitution.Substitution
and a way of choosing if this substitution should be applied for a discovered member.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MemberSubstitution.Replacement.Binding
A binding for a replacement of a field or method access within another method.static interface
MemberSubstitution.Replacement.Factory
A factory for creating a replacement for an instrumented method.static class
MemberSubstitution.Replacement.ForElementMatchers
A replacement that substitutes a member based on a row of element matchers.static class
MemberSubstitution.Replacement.ForFirstBinding
A replacement that only resolves the first matching replacement of a list of replacements.static class
MemberSubstitution.Replacement.InvocationType
Describes a method invocation type.static class
MemberSubstitution.Replacement.NoOp
A non-operational replacement.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MemberSubstitution.Replacement.Binding
bind(TypeDescription instrumentedType, MethodDescription instrumentedMethod, FieldDescription.InDefinedShape fieldDescription, boolean writeAccess)
Binds this replacement for a field that was discovered.MemberSubstitution.Replacement.Binding
bind(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypeDescription typeDescription, MethodDescription methodDescription, MemberSubstitution.Replacement.InvocationType invocationType)
Binds this replacement for a field that was discovered.
-
-
-
Method Detail
-
bind
MemberSubstitution.Replacement.Binding bind(TypeDescription instrumentedType, MethodDescription instrumentedMethod, FieldDescription.InDefinedShape fieldDescription, boolean writeAccess)
Binds this replacement for a field that was discovered.- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.fieldDescription
- The field that was discovered.writeAccess
-true
if this field was written to.- Returns:
- A binding for the discovered field access.
-
bind
MemberSubstitution.Replacement.Binding bind(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypeDescription typeDescription, MethodDescription methodDescription, MemberSubstitution.Replacement.InvocationType invocationType)
Binds this replacement for a field that was discovered.- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.typeDescription
- The type on which the method was invoked.methodDescription
- The method that was discovered.invocationType
- The invocation type for this method.- Returns:
- A binding for the discovered method invocation.
-
-