Package net.bytebuddy.matcher
Class StringMatcher
java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<String>
net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<String>
net.bytebuddy.matcher.StringMatcher
- All Implemented Interfaces:
ElementMatcher<String>
,ElementMatcher.Junction<String>
An element matcher that compares two strings by a given pattern which is characterized by a
StringMatcher.Mode
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Defines the mode aStringMatcher
compares to strings with.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 final StringMatcher.Mode
The mode to apply for matching the given value against the matcher's input.private final String
The text value to match against. -
Constructor Summary
ConstructorsConstructorDescriptionStringMatcher
(String value, StringMatcher.Mode mode) Creates a new string matcher. -
Method Summary
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues
matches
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase
and, or
-
Field Details
-
value
The text value to match against. -
mode
The mode to apply for matching the given value against the matcher's input.
-
-
Constructor Details
-
StringMatcher
Creates a new string matcher.- Parameters:
value
- The value that is the base of the matching.mode
- The mode to apply for matching the given value against the matcher's input
-
-
Method Details
-
doMatch
Matches the supplied value if it was found not to benull
.- Specified by:
doMatch
in classElementMatcher.Junction.ForNonNullValues<String>
- Parameters:
target
- The instance to be matched.- Returns:
true
if the given element is matched by this matcher orfalse
otherwise.
-
toString
-