com.alibaba.druid.util
Class ServletPathMatcher

java.lang.Object
  extended by com.alibaba.druid.util.ServletPathMatcher
All Implemented Interfaces:
PatternMatcher

public class ServletPathMatcher
extends Object
implements PatternMatcher


Constructor Summary
ServletPathMatcher()
           
 
Method Summary
 boolean matches(String pattern, String source)
           three type: endsWithMatch(eg.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletPathMatcher

public ServletPathMatcher()
Method Detail

matches

public boolean matches(String pattern,
                       String source)

three type: endsWithMatch(eg. /xxx*=/xxx/xyz), startsWithMatch(eg. *.xxx=abc.xxx), equals(eg. /xxx=/xxx).

Notice: *xxx* will match *xxxyyyy. endsWithMatch first.

Specified by:
matches in interface PatternMatcher
Parameters:
pattern - the pattern to match against
source - the source to match
Returns:
true if the given source matches the specified pattern, false otherwise.


Copyright © 2012 Alibaba Group. All Rights Reserved.