Package net.bytebuddy.matcher
Class NullMatcher<T>
- java.lang.Object
-
- net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<T>
-
- net.bytebuddy.matcher.NullMatcher<T>
-
- Type Parameters:
T
- The type of the matched entity.
- All Implemented Interfaces:
ElementMatcher<T>
,ElementMatcher.Junction<T>
@Enhance public class NullMatcher<T> extends ElementMatcher.Junction.AbstractBase<T>
An element matcher that matches thenull
value.
-
-
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 static NullMatcher<?>
INSTANCE
An instance of this matcher.
-
Constructor Summary
Constructors Constructor Description NullMatcher()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> ElementMatcher.Junction<T>
make()
Returns a matcher that only matchesnull
.boolean
matches(T 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
-
INSTANCE
private static final NullMatcher<?> INSTANCE
An instance of this matcher.
-
-
Method Detail
-
make
public static <T> ElementMatcher.Junction<T> make()
Returns a matcher that only matchesnull
.- Type Parameters:
T
- The type of the matched entity.- Returns:
- A matcher that only matches
null
.
-
matches
public boolean matches(T 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
-
-