类 AbstractRegexpMethodPointcut
java.lang.Object
infra.core.OrderedSupport
infra.aop.support.StaticMethodMatcher
infra.aop.support.StaticMethodMatcherPointcut
infra.aop.support.AbstractRegexpMethodPointcut
- 所有已实现的接口:
MethodMatcher,Pointcut,infra.core.Ordered,Serializable
- 直接已知子类:
JdkRegexpMethodPointcut
public abstract class AbstractRegexpMethodPointcut
extends StaticMethodMatcherPointcut
implements Serializable
Abstract base regular expression pointcut bean. JavaBean properties are:
- pattern: regular expression for the fully-qualified method names to match. The exact regexp syntax will depend on the subclass (e.g. Perl5 regular expressions)
- patterns: alternative property taking a String array of patterns. The result will be the union of these patterns.
Note: the regular expressions must be a match. For example,
.*get.* will match com.mycom.Foo.getBar().
get.* will not.
This base class is serializable. Subclasses should declare all fields transient;
the initPatternRepresentation(java.lang.String[]) method will be invoked again on deserialization.
- 从以下版本开始:
- 4.0
- 作者:
- Rod Johnson, Juergen Hoeller, Rob Harrop, TODAY 2021/2/4 12:13
- 另请参阅:
-
嵌套类概要
从接口继承的嵌套类/接口 infra.aop.MethodMatcher
MethodMatcher.ClassFilterAwareUnionIntroductionAwareMethodMatcher, MethodMatcher.ClassFilterAwareUnionMethodMatcher, MethodMatcher.IntersectionIntroductionAwareMethodMatcher, MethodMatcher.IntersectionMethodMatcher, MethodMatcher.NegateMethodMatcher, MethodMatcher.UnionIntroductionAwareMethodMatcher, MethodMatcher.UnionMethodMatcher从接口继承的嵌套类/接口 infra.aop.Pointcut
Pointcut.GetterPointcut, Pointcut.SetterPointcut -
字段概要
字段修饰符和类型字段说明private String[]Regular expressions not to match.private String[]Regular expressions to match.从类继承的字段 infra.core.OrderedSupport
order从接口继承的字段 infra.aop.MethodMatcher
TRUE从接口继承的字段 infra.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanString[]Returns the regular expressions for exclusion matching.String[]Return the regular expressions for method matching.inthashCode()protected abstract voidinitExcludedPatternRepresentation(String[] patterns) Subclasses must implement this to initialize regexp pointcuts.protected abstract voidinitPatternRepresentation(String[] patterns) Subclasses must implement this to initialize regexp pointcuts.booleanTry to match the regular expression against the fully qualified name of the target class as well as against the method's declaring class, plus the name of the method.protected abstract booleanDoes the pattern at the given index match the given String?protected abstract booleanmatchesExclusion(String pattern, int patternIndex) Does the exclusion pattern at the given index match the given String?protected booleanmatchesPattern(String signatureString) Match the specified candidate against the configured patterns.voidsetExcludedPattern(String excludedPattern) Convenience method when we have only a single exclusion pattern.voidsetExcludedPatterns(String... excludedPatterns) Set the regular expressions defining methods to match for exclusion.voidsetPattern(String pattern) Convenience method when we have only a single pattern.voidsetPatterns(String... patterns) Set the regular expressions defining methods to match.toString()从类继承的方法 infra.aop.support.StaticMethodMatcherPointcut
getClassFilter, getMethodMatcher, setClassFilter从类继承的方法 infra.aop.support.StaticMethodMatcher
isRuntime, matches从类继承的方法 infra.core.OrderedSupport
getOrder, setOrder
-
字段详细资料
-
patterns
Regular expressions to match. -
excludedPatterns
Regular expressions not to match.
-
-
构造器详细资料
-
AbstractRegexpMethodPointcut
public AbstractRegexpMethodPointcut()
-
-
方法详细资料
-
setPattern
Convenience method when we have only a single pattern. Use either this method orsetPatterns(java.lang.String...), not both. -
setPatterns
Set the regular expressions defining methods to match. Matching will be the union of all these; if any match, the pointcut matches.- 抛出:
NullPointerException- if patterns containsnull- 另请参阅:
-
getPatterns
Return the regular expressions for method matching. -
setExcludedPattern
Convenience method when we have only a single exclusion pattern. Use either this method orsetExcludedPatterns(java.lang.String...), not both. -
setExcludedPatterns
Set the regular expressions defining methods to match for exclusion. Matching will be the union of all these; if any match, the pointcut matches.- 抛出:
NullPointerException- if excludedPatterns containsnull- 另请参阅:
-
getExcludedPatterns
Returns the regular expressions for exclusion matching. -
matches
Try to match the regular expression against the fully qualified name of the target class as well as against the method's declaring class, plus the name of the method.- 指定者:
matches在接口中MethodMatcher- 参数:
method- the candidate methodtargetClass- the target class- 返回:
- whether or not this method matches on application startup.
-
matchesPattern
Match the specified candidate against the configured patterns.- 参数:
signatureString- "java.lang.Object.hashCode" style signature- 返回:
- whether the candidate matches at least one of the specified patterns
-
initPatternRepresentation
protected abstract void initPatternRepresentation(String[] patterns) throws IllegalArgumentException Subclasses must implement this to initialize regexp pointcuts. Can be invoked multiple times.This method will be invoked from the
setPatterns(java.lang.String...)method, and also on deserialization.- 参数:
patterns- the patterns to initialize- 抛出:
IllegalArgumentException- in case of an invalid pattern
-
initExcludedPatternRepresentation
protected abstract void initExcludedPatternRepresentation(String[] patterns) throws IllegalArgumentException Subclasses must implement this to initialize regexp pointcuts. Can be invoked multiple times.This method will be invoked from the
setExcludedPatterns(java.lang.String...)method, and also on deserialization.- 参数:
patterns- the patterns to initialize- 抛出:
IllegalArgumentException- in case of an invalid pattern
-
matches
Does the pattern at the given index match the given String?- 参数:
pattern- theStringpattern to matchpatternIndex- index of pattern (starting from 0)- 返回:
trueif there is a match,falseotherwise
-
matchesExclusion
Does the exclusion pattern at the given index match the given String?- 参数:
pattern- theStringpattern to matchpatternIndex- index of pattern (starting from 0)- 返回:
trueif there is a match,falseotherwise
-
equals
-
hashCode
public int hashCode() -
toString
-