org.springframework.util
Class PathMatcher


public abstract class PathMatcher

Utility for matching paths with patterns in an Ant-like way. Examples are provided below. Part of this mapping code has been kindly borrowed from Ant (http://ant.apache.org).

The mapping matches urls using the following rules:

Some examples:

Author:
Alef Arendsen

Method Summary
 static booleanmatch(String pattern, String str)
          Matches a strign agains the given pattern

Method Detail

match

public static boolean match(String pattern, String str)
Matches a strign agains the given pattern
Parameters:
pattern - the pattern to match against
str - the string to test
Returns: true is the arguments matched, false otherwise