Top Description Inners Constructors Methods
org.springframework.aop.support

public abstract Class MethodMatchers

extends Object
Class Inheritance
Imports
java.io.Serializable, java.lang.reflect.Method, java.util.Objects, org.springframework.aop.ClassFilter, .IntroductionAwareMethodMatcher, .MethodMatcher, org.springframework.lang.Nullable, org.springframework.util.Assert

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).

Authors
Rod Johnson, Rob Harrop, Juergen Hoeller, Sam Brannen
Since
11.11.2003
See Also
ClassFilters, Pointcuts

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
MethodMatchers.ClassFilterAwareUnionIntroductionAwareMethodMatcher

MethodMatcher implementation for a union of two given MethodMatchers of which at least one is an IntroductionAwareMethodMatcher, supporting an associated ClassFilter per MethodMatcher.

private static class
MethodMatchers.ClassFilterAwareUnionMethodMatcher

MethodMatcher implementation for a union of two given MethodMatchers, supporting an associated ClassFilter per MethodMatcher.

private static class
MethodMatchers.IntersectionIntroductionAwareMethodMatcher

MethodMatcher implementation for an intersection of two given MethodMatchers of which at least one is an IntroductionAwareMethodMatcher.

private static class
MethodMatchers.IntersectionMethodMatcher

MethodMatcher implementation for an intersection of two given MethodMatchers.

private static class
private static class
MethodMatchers.UnionIntroductionAwareMethodMatcher

MethodMatcher implementation for a union of two given MethodMatchers of which at least one is an IntroductionAwareMethodMatcher.

private static class
MethodMatchers.UnionMethodMatcher

MethodMatcher implementation for a union of two given MethodMatchers.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static MethodMatcher

Returns:

a distinct MethodMatcher that matches all methods that both of the given MethodMatchers match
intersection
(MethodMatcher
the first MethodMatcher
mm1
,
MethodMatcher
the second MethodMatcher
mm2
)

Match all methods that both of the given MethodMatchers match.

public static boolean

Returns:

whether this method matches statically
matches
(MethodMatcher
the MethodMatcher to apply (may be an IntroductionAwareMethodMatcher)
mm
,
Method
the candidate method
method
,
Class<?>
the target class
targetClass
,
boolean
true if the object on whose behalf we are asking is the subject on one or more introductions; false otherwise
hasIntroductions
)

Apply the given MethodMatcher to the given Method, supporting an org.springframework.aop.IntroductionAwareMethodMatcher (if applicable).

public static MethodMatcher

Returns:

a matcher that represents the logical negation of the specified matcher
negate
(MethodMatcher
the MethodMatcher to negate
methodMatcher
)

Return a method matcher that represents the logical negation of the specified matcher instance.

public static MethodMatcher

Returns:

a distinct MethodMatcher that matches all methods that either of the given MethodMatchers matches
union
(MethodMatcher
the first MethodMatcher
mm1
,
MethodMatcher
the second MethodMatcher
mm2
)

Match all methods that either (or both) of the given MethodMatchers matches.

pack-priv static MethodMatcher

Returns:

a distinct MethodMatcher that matches all methods that either of the given MethodMatchers matches
union
(MethodMatcher
the first MethodMatcher
mm1
,
ClassFilter
the corresponding ClassFilter for the first MethodMatcher
cf1
,
MethodMatcher
the second MethodMatcher
mm2
,
ClassFilter
the corresponding ClassFilter for the second MethodMatcher
cf2
)

Match all methods that either (or both) of the given MethodMatchers matches.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait