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

public Class JdkRegexpMethodPointcut

extends AbstractRegexpMethodPointcut
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.util.regex.Matcher, .Pattern, .PatternSyntaxException

Regular expression pointcut based on the java.util.regex package. Supports the following JavaBean properties:

Note

the regular expressions must be a match. For example, .*get.* will match com.mycom.Foo.getBar(). get.* will not.

Authors
Dmitriy Kopylenko, Rob Harrop
Since
1.1

Field Summary

Modifier and TypeField and Description
private Pattern[]
compiledExclusionPatterns

Compiled form of the exclusion patterns.

private Pattern[]
compiledPatterns

Compiled form of the patterns.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Pattern[]
compilePatterns(String[] source)

Compiles the supplied String[] into an array of Pattern objects and returns that array.

protected void
initExcludedPatternRepresentation(String[]
the patterns to initialize
excludedPatterns
)

Implements abstract org.springframework.aop.support.AbstractRegexpMethodPointcut.initExcludedPatternRepresentation.

Initialize exclusion Patterns from the supplied String[].

protected void
initPatternRepresentation(String[]
the patterns to initialize
patterns
)

Implements abstract org.springframework.aop.support.AbstractRegexpMethodPointcut.initPatternRepresentation.

Initialize Patterns from the supplied String[].

protected boolean
matches(String
the String pattern to match
pattern
,
int
index of pattern (starting from 0)
patternIndex
)

Implements abstract org.springframework.aop.support.AbstractRegexpMethodPointcut.matches.

Returns true if the Pattern at index patternIndex matches the supplied candidate String.

protected boolean
matchesExclusion(String
the String pattern to match
candidate
,
int
index of pattern (starting from 0)
patternIndex
)

Implements abstract org.springframework.aop.support.AbstractRegexpMethodPointcut.matchesExclusion.

Returns true if the exclusion Pattern at index patternIndex matches the supplied candidate String.

Inherited from org.springframework.aop.support.AbstractRegexpMethodPointcut:
equalsgetExcludedPatternsgetPatternshashCodematchesmatchesPatternsetExcludedPatternsetExcludedPatternssetPatternsetPatternstoString

Field Detail

compiledExclusionPatternsback to summary
private Pattern[] compiledExclusionPatterns

Compiled form of the exclusion patterns.

compiledPatternsback to summary
private Pattern[] compiledPatterns

Compiled form of the patterns.

Constructor Detail

JdkRegexpMethodPointcutback to summary
public JdkRegexpMethodPointcut()

Method Detail

compilePatternsback to summary
private Pattern[] compilePatterns(String[] source) throws PatternSyntaxException

Compiles the supplied String[] into an array of Pattern objects and returns that array.

initExcludedPatternRepresentationback to summary
protected void initExcludedPatternRepresentation(String[] excludedPatterns) throws PatternSyntaxException

Implements abstract org.springframework.aop.support.AbstractRegexpMethodPointcut.initExcludedPatternRepresentation.

Initialize exclusion Patterns from the supplied String[].

Parameters
excludedPatterns:String[]

Doc from org.springframework.aop.support.AbstractRegexpMethodPointcut.initExcludedPatternRepresentation.

the patterns to initialize

Annotations
@Override
initPatternRepresentationback to summary
protected void initPatternRepresentation(String[] patterns) throws PatternSyntaxException

Implements abstract org.springframework.aop.support.AbstractRegexpMethodPointcut.initPatternRepresentation.

Initialize Patterns from the supplied String[].

Parameters
patterns:String[]

Doc from org.springframework.aop.support.AbstractRegexpMethodPointcut.initPatternRepresentation.

the patterns to initialize

Annotations
@Override
matchesback to summary
protected boolean matches(String pattern, int patternIndex)

Implements abstract org.springframework.aop.support.AbstractRegexpMethodPointcut.matches.

Returns true if the Pattern at index patternIndex matches the supplied candidate String.

Parameters
pattern:String

Doc from org.springframework.aop.support.AbstractRegexpMethodPointcut.matches.

the String pattern to match

patternIndex:int

Doc from org.springframework.aop.support.AbstractRegexpMethodPointcut.matches.

index of pattern (starting from 0)

Returns:boolean

Doc from org.springframework.aop.support.AbstractRegexpMethodPointcut.matches.

true if there is a match, false otherwise

Annotations
@Override
matchesExclusionback to summary
protected boolean matchesExclusion(String candidate, int patternIndex)

Implements abstract org.springframework.aop.support.AbstractRegexpMethodPointcut.matchesExclusion.

Returns true if the exclusion Pattern at index patternIndex matches the supplied candidate String.

Parameters
candidate:String

Doc from org.springframework.aop.support.AbstractRegexpMethodPointcut.matchesExclusion.

the String pattern to match

patternIndex:int

Doc from org.springframework.aop.support.AbstractRegexpMethodPointcut.matchesExclusion.

index of pattern (starting from 0)

Returns:boolean

Doc from org.springframework.aop.support.AbstractRegexpMethodPointcut.matchesExclusion.

true if there is a match, false otherwise

Annotations
@Override