类 MethodMatchers
java.lang.Object
cn.taketoday.aop.support.MethodMatchers
Static utility methods for composing
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).
- 从以下版本开始:
- 3.0
- 作者:
- Rod Johnson, Rob Harrop, Juergen Hoeller, Sam Brannen, TODAY 2021/2/1 18:19
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static MethodMatcherintersection(MethodMatcher mm1, MethodMatcher mm2) Match all methods that both of the given MethodMatchers match.static booleanmatches(MethodMatcher mm, Method method, Class<?> targetClass, boolean hasIntroductions) Apply the given MethodMatcher to the given Method, supporting anIntroductionAwareMethodMatcher(if applicable).static MethodMatcherunion(MethodMatcher mm1, ClassFilter cf1, MethodMatcher mm2, ClassFilter cf2) Match all methods that either (or both) of the given MethodMatchers matches.static MethodMatcherunion(MethodMatcher mm1, MethodMatcher mm2) Match all methods that either (or both) of the given MethodMatchers matches.
-
构造器详细资料
-
MethodMatchers
public MethodMatchers()
-
-
方法详细资料
-
union
Match all methods that either (or both) of the given MethodMatchers matches.- 参数:
mm1- the first MethodMatchermm2- the second MethodMatcher- 返回:
- a distinct MethodMatcher that matches all methods that either of the given MethodMatchers matches
-
union
public static MethodMatcher union(MethodMatcher mm1, ClassFilter cf1, MethodMatcher mm2, ClassFilter cf2) Match all methods that either (or both) of the given MethodMatchers matches.- 参数:
mm1- the first MethodMatchercf1- the corresponding ClassFilter for the first MethodMatchermm2- the second MethodMatchercf2- the corresponding ClassFilter for the second MethodMatcher- 返回:
- a distinct MethodMatcher that matches all methods that either of the given MethodMatchers matches
-
intersection
Match all methods that both of the given MethodMatchers match.- 参数:
mm1- the first MethodMatchermm2- the second MethodMatcher- 返回:
- a distinct MethodMatcher that matches all methods that both of the given MethodMatchers match
-
matches
public static boolean matches(MethodMatcher mm, Method method, Class<?> targetClass, boolean hasIntroductions) Apply the given MethodMatcher to the given Method, supporting anIntroductionAwareMethodMatcher(if applicable).- 参数:
mm- the MethodMatcher to apply (may be an IntroductionAwareMethodMatcher)method- the candidate methodtargetClass- the target classhasIntroductions-trueif the object on whose behalf we are asking is the subject on one or more introductions;falseotherwise- 返回:
- whether or not this method matches statically
-