Class ModifierMatcher<T extends ModifierReviewable>
java.lang.Object
net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<T>
net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues<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.ForNonNullValues<T>
An element matcher that matches a byte code element by its modifiers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDetermines the type of modifier to be matched by aModifierMatcher.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 ModifierMatcher.ModeThe matching mode to apply by this modifier matcher. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new element matcher that matches an element by its modifier. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanMatches the supplied value if it was found not to benull.static <T extends ModifierReviewable>
ElementMatcher.Junction<T> of(ModifierMatcher.Mode mode) Returns a new element matcher that matches an element by its modifier.toString()Methods inherited from class ElementMatcher.Junction.ForNonNullValues
matchesMethods inherited from class ElementMatcher.Junction.AbstractBase
and, or
-
Field Details
-
mode
The matching mode to apply by this modifier matcher.
-
-
Constructor Details
-
ModifierMatcher
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 Details
-
of
public static <T extends ModifierReviewable> ElementMatcher.Junction<T> of(ModifierMatcher.Mode mode) Returns a new element matcher that matches an element by its modifier.- Type Parameters:
T- The type of the matched entity.- Parameters:
mode- The match mode to apply to the matched element's modifier.- Returns:
- A matcher that matches methods of the provided sort.
-
doMatch
Matches the supplied value if it was found not to benull.- Specified by:
doMatchin classElementMatcher.Junction.ForNonNullValues<T extends ModifierReviewable>- Parameters:
target- The instance to be matched.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
toString
-