Class org.as2lib.aop.matcher.RegexpMatcher

Implemented Interfaces

Matcher

Description

RegexpMatcher matches a join point with a regular expression pattern.

Note that this matcher is less performant than the WildcardMatcher and also a little harder to use if you are not familiar with regular expressions. I thus encourage you to use the wildcard matcher if the supported wildcards fit all your needs.

See Also

Method Index

new RegexpMatcher()
match()

Inherited from BasicClass

Constructor Detail

RegexpMatcher

public function RegexpMatcher(Void)

Constructs a new RegexpMatcher instance.

Method Detail

match

public function match(joinPoint:String, regexpPattern:String):Boolean

Checks whether the given join point matches the given regular expression pattern.

The join point string normally looks something like this: static org.as2lib.env.log.Logger.info

And the regular expression pattern may look like this: .* org\\.as2lib\\..*\\.log\\.Logger\\.info

For more information on what keywords can be used in the pattern take a look at the Pattern class.

Parameters

joinPointthe join point to check whether it matches the given regexpPattern
regexpPatternthe regular expression pattern to check whether it matches the given joinPoint

Return

true if the joinPoint matches the given regexpPattern else false

Specified By

match() in org.as2lib.aop.Matcher