Package net.bytebuddy.matcher
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher.Junction
ElementMatcher.Junction.AbstractBase<V>, ElementMatcher.Junction.Conjunction<W>, ElementMatcher.Junction.Disjunction<W>, ElementMatcher.Junction.ForNonNullValues<W>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ElementMatcher<? super W>>matchersThe element matchers that constitute this conjunction.
-
Constructor Summary
Constructors Constructor Description Conjunction(java.util.List<ElementMatcher<? super W>> matchers)Creates a new conjunction matcher.Conjunction(ElementMatcher<? super W>... matcher)Creates a new conjunction matcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(W target)Matches a target against this element matcher.java.lang.StringtoString()-
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase
and, or
-
-
-
-
Field Detail
-
matchers
private final java.util.List<ElementMatcher<? super W>> matchers
The element matchers that constitute this conjunction.
-
-
Constructor Detail
-
Conjunction
@Enhance public Conjunction(ElementMatcher<? super W>... matcher)
Creates a new conjunction matcher.- Parameters:
matcher- The represented matchers in application order.
-
Conjunction
public Conjunction(java.util.List<ElementMatcher<? super W>> matchers)
Creates a new conjunction matcher.- Parameters:
matchers- The represented matchers in application order.
-
-
Method Detail
-
matches
public boolean matches(@UnknownNull W target)
Matches a target against this element matcher.- Parameters:
target- The instance to be matched ornull.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-