Class MemberSubstitution.Replacement.ForElementMatchers

    • Field Detail

      • 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.
    • Constructor Detail

      • 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.