Package net.bytebuddy.matcher
Class BooleanMatcher<T>
java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<T>
net.bytebuddy.matcher.BooleanMatcher<T>
- Type Parameters:
T- The actual matched type of this matcher.
- All Implemented Interfaces:
ElementMatcher<T>,ElementMatcher.Junction<T>
An element matcher that returns a fixed result.
-
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
FieldsModifier and TypeFieldDescriptionprivate static final BooleanMatcher<?> A matcher that always returnsfalse.protected final booleanThe predefined result.private static final BooleanMatcher<?> A matcher that always returnstrue. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase
and, or
-
Field Details
-
TRUE
A matcher that always returnstrue. -
FALSE
A matcher that always returnsfalse. -
matches
protected final boolean matchesThe predefined result.
-
-
Constructor Details
-
BooleanMatcher
public BooleanMatcher(boolean matches) Creates a new boolean element matcher.- Parameters:
matches- The predefined result.
-
-
Method Details
-
of
Returns an element matcher that returns the provided result.- Type Parameters:
T- The type of the matched entity.- Parameters:
matches- A matcher that always matches or never matches.- Returns:
- A matcher that returns the provided result for all inputs.
-
matches
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
-