Class ElementMatcher.Junction.Conjunction<W>

java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<W>
net.bytebuddy.matcher.ElementMatcher.Junction.Conjunction<W>
Type Parameters:
W - The type of the object that is being matched.
All Implemented Interfaces:
ElementMatcher<W>, ElementMatcher.Junction<W>
Enclosing interface:
ElementMatcher.Junction<S>

@Enhance public static class ElementMatcher.Junction.Conjunction<W> extends ElementMatcher.Junction.AbstractBase<W>
A conjunction matcher which only matches an element if both represented matchers constitute a match.
  • Field Details

    • matchers

      private final List<ElementMatcher<? super W>> matchers
      The element matchers that constitute this conjunction.
  • Constructor Details

    • Conjunction

      public Conjunction(ElementMatcher<? super W>... matcher)
      Creates a new conjunction matcher.
      Parameters:
      matcher - The represented matchers in application order.
    • Conjunction

      public Conjunction(List<ElementMatcher<? super W>> matchers)
      Creates a new conjunction matcher.
      Parameters:
      matchers - The represented matchers in application order.
  • Method Details

    • matches

      public boolean matches(@UnknownNull W target)
      Matches a target against this element matcher.
      Parameters:
      target - The instance to be matched or null.
      Returns:
      true if the given element is matched by this matcher or false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object