Package net.bytebuddy.matcher
Class ModifierMatcher<T extends ModifierReviewable>
- java.lang.Object
-
- net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<T>
-
- net.bytebuddy.matcher.ModifierMatcher<T>
-
- Type Parameters:
T
- The type of the matched entity.
- All Implemented Interfaces:
ElementMatcher<T>
,ElementMatcher.Junction<T>
@Enhance public class ModifierMatcher<T extends ModifierReviewable> extends ElementMatcher.Junction.AbstractBase<T>
An element matcher that matches a byte code element by its modifiers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModifierMatcher.Mode
Determines the type of modifier to be matched by aModifierMatcher
.-
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 ModifierMatcher(ModifierMatcher.Mode mode)
Creates a new element matcher that matches an element by its modifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(T target)
Matches a target against this element matcher.String
toString()
-
Methods inherited from class net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase
and, or
-
-
-
-
Constructor Detail
-
ModifierMatcher
public ModifierMatcher(ModifierMatcher.Mode mode)
Creates a new element matcher that matches an element by its modifier.- Parameters:
mode
- The match mode to apply to the matched element's modifier.
-
-
Method Detail
-
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.
-
-