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>
-
-
Field Summary
Fields Modifier and Type Field Description private ElementMatcher<? super W>
left
The element matchers that constitute this conjunction.private ElementMatcher<? super W>
right
The element matchers that constitute this conjunction.
-
Constructor Summary
Constructors Constructor Description Conjunction(ElementMatcher<? super W> left, ElementMatcher<? super W> right)
Creates a new conjunction matcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(W target)
Matches a target against this element matcher.java.lang.String
toString()
-
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase
and, or
-
-
-
-
Field Detail
-
left
private final ElementMatcher<? super W> left
The element matchers that constitute this conjunction.
-
right
private final ElementMatcher<? super W> right
The element matchers that constitute this conjunction.
-
-
Constructor Detail
-
Conjunction
public Conjunction(ElementMatcher<? super W> left, ElementMatcher<? super W> right)
Creates a new conjunction matcher.- Parameters:
left
- The first matcher to consult for a match.right
- The second matcher to consult for a match. This matcher is only consulted if thefirst
matcher constituted a match.
-
-
Method Detail
-
matches
public boolean matches(W target)
Matches a target against this element matcher.- Parameters:
target
- The instance to be matched.- Returns:
true
if the given element is matched by this matcher orfalse
otherwise.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-