Package net.bytebuddy.matcher
Class StringMatcher
- java.lang.Object
-
- net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<String>
-
- net.bytebuddy.matcher.StringMatcher
-
- All Implemented Interfaces:
ElementMatcher<String>,ElementMatcher.Junction<String>
@Enhance public class StringMatcher extends ElementMatcher.Junction.AbstractBase<String>
An element matcher that compares two strings by a given pattern which is characterized by aStringMatcher.Mode.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStringMatcher.ModeDefines the mode aStringMatchercompares 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>
-
-
Constructor Summary
Constructors Constructor Description StringMatcher(String value, StringMatcher.Mode mode)Creates a new string matcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(String target)Matches a target against this element matcher.StringtoString()-
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase
and, or
-
-
-
-
Constructor Detail
-
StringMatcher
public StringMatcher(String value, StringMatcher.Mode mode)
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 Detail
-
matches
public boolean matches(String target)
Matches a target against this element matcher.- Parameters:
target- The instance to be matched.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
-