Class MemberSubstitution.Replacement.ForElementMatchers.Factory

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

@Enhance protected static class MemberSubstitution.Replacement.ForElementMatchers.Factory extends Object implements MemberSubstitution.Replacement.Factory
A factory for creating a replacement that chooses members based on a row of element matchers.
  • Field Details

    • fieldMatcher

      private final ElementMatcher<? super FieldDescription> 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.
    • substitutionFactory

      The substitution factory to create a substitution from.
  • Constructor Details

    • Factory

      protected Factory(ElementMatcher<? super FieldDescription> fieldMatcher, ElementMatcher<? super MethodDescription> methodMatcher, boolean matchFieldRead, boolean matchFieldWrite, boolean includeVirtualCalls, boolean includeSuperCalls, MemberSubstitution.Substitution.Factory<? super MemberSubstitution.Target.ForMember> substitutionFactory)
      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.
      substitutionFactory - The substitution factory to create a substitution from.
  • Method Details