Class MemberSubstitution.Replacement.ForElementMatchers

java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Replacement.ForElementMatchers
All Implemented Interfaces:
MemberSubstitution.Replacement
Enclosing interface:
MemberSubstitution.Replacement

@Enhance public static class MemberSubstitution.Replacement.ForElementMatchers extends Object implements MemberSubstitution.Replacement
A replacement that substitutes a member based on a row of element matchers.
  • Field Details

    • fieldMatcher

      private final ElementMatcher<? super FieldDescription.InDefinedShape> fieldMatcher
      The field matcher to consider when discovering fields.
    • methodMatcher

      private final ElementMatcher<? super MethodDescription> methodMatcher
      The method matcher to consider when discovering methods.
    • matchFieldRead

      private final boolean matchFieldRead
      true if field reading access should be matched.
    • matchFieldWrite

      private final boolean matchFieldWrite
      true if field writing access should be matched.
    • includeVirtualCalls

      private final boolean includeVirtualCalls
      true if virtual method calls should be matched.
    • includeSuperCalls

      private final boolean includeSuperCalls
      true if super method calls should be matched.
    • substitution

      private final MemberSubstitution.Substitution substitution
      The substitution to trigger if a member is matched.
  • Constructor Details

    • ForElementMatchers

      protected ForElementMatchers(ElementMatcher<? super FieldDescription.InDefinedShape> fieldMatcher, ElementMatcher<? super MethodDescription> methodMatcher, boolean matchFieldRead, boolean matchFieldWrite, boolean includeVirtualCalls, boolean includeSuperCalls, MemberSubstitution.Substitution substitution)
      Creates a new replacement that triggers a substitution based on a row of matchers.
      Parameters:
      fieldMatcher - The field matcher to consider when discovering fields.
      methodMatcher - The method matcher to consider when discovering methods.
      matchFieldRead - true if field reading access should be matched.
      matchFieldWrite - true if field writing access should be matched.
      includeVirtualCalls - true if virtual method calls should be matched.
      includeSuperCalls - true if super method calls should be matched.
      substitution - The substitution to trigger if a member is matched.
  • Method Details