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 enumDefines the mode aStringMatchercompares to strings with.Nested classes/interfaces inherited from interface ElementMatcher
ElementMatcher.Junction<S>Nested classes/interfaces inherited from interface 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.ModeThe mode to apply for matching the given value against the matcher's input.private final StringThe text value to match against. -
Constructor Summary
ConstructorsConstructorDescriptionStringMatcher(String value, StringMatcher.Mode mode) Creates a new string matcher. -
Method Summary
Methods inherited from class ElementMatcher.Junction.ForNonNullValues
matchesMethods inherited from class 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:
doMatchin classElementMatcher.Junction.ForNonNullValues<String>- Parameters:
target- The instance to be matched.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
toString
-