public abstract class MethodMatchers
extends java.lang.Object
MethodMatchers
.
A MethodMatcher may be evaluated statically (based on method and target class) or need further evaluation dynamically (based on arguments at the time of method invocation).
ClassFilters
,
Pointcuts
Constructor and Description |
---|
MethodMatchers() |
Modifier and Type | Method and Description |
---|---|
static MethodMatcher |
intersection(MethodMatcher mm1,
MethodMatcher mm2)
Match all methods that both of the given MethodMatchers match.
|
static boolean |
matches(MethodMatcher mm,
java.lang.reflect.Method method,
java.lang.Class<?> targetClass,
boolean hasIntroductions)
Apply the given MethodMatcher to the given Method, supporting an
IntroductionAwareMethodMatcher
(if applicable). |
static MethodMatcher |
union(MethodMatcher mm1,
MethodMatcher mm2)
Match all methods that either (or both) of the given MethodMatchers matches.
|
public static MethodMatcher union(MethodMatcher mm1, MethodMatcher mm2)
mm1
- the first MethodMatchermm2
- the second MethodMatcherpublic static MethodMatcher intersection(MethodMatcher mm1, MethodMatcher mm2)
mm1
- the first MethodMatchermm2
- the second MethodMatcherpublic static boolean matches(MethodMatcher mm, java.lang.reflect.Method method, java.lang.Class<?> targetClass, boolean hasIntroductions)
IntroductionAwareMethodMatcher
(if applicable).mm
- the MethodMatcher to apply (may be an IntroductionAwareMethodMatcher)method
- the candidate methodtargetClass
- the target classhasIntroductions
- true
if the object on whose behalf we are
asking is the subject on one or more introductions; false
otherwise