Class org.as2lib.aop.matcher.WildcardMatcher

org.as2lib.core.BasicClass
   +--org.as2lib.aop.matcher.WildcardMatcher

Implemented Interfaces

Matcher

Description

WildcardMatcher matches a join point with a pattern that may contain wildcards. TODO: Add a list of supported wildcards and how they can be used.

Method Index

new WildcardMatcher()

match()

Inherited from BasicClass

toString()

Constructor Detail

WildcardMatcher

public function WildcardMatcher(Void)

Constructs a new WildcardMatcher instance.

Method Detail

match

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

Checks if the passed joinPoint represented by a string matches the given pattern.

Supported wildcards are '*' and '..'.

false will be returned if:

  • The passed-in joinPoint is null, undefined or an empty string.
  • The given pattern does not match the given joinPoint.

A pattern of value null, undefined or empty string matches every join point.

Parameters

joinPointthe string representation of the join point to match with the given pattern
patternthe pattern to match with the joinPoint

Return

true if the joinPoint matches the pattern else false

Specified By

match() in org.as2lib.aop.Matcher