Interface PathMatcher

All Known Implementing Classes:
AntPathMatcher, RegexPathMatcher

public interface PathMatcher
Interface for components that can match source strings against a specified pattern string.

Different implementations can support different pattern types, for example, Ant style path expressions, or regular expressions, or other types of text based patterns.

Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final AntPathMatcher
    The default Ant style path matcher.
    static final RegexPathMatcher
    The default regex style path matcher.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    matches(String pattern, String source)
    Returns true if the given source matches the specified pattern, false otherwise.
  • Field Details

    • ANT

      static final AntPathMatcher ANT
      The default Ant style path matcher.
    • REGEX

      static final RegexPathMatcher REGEX
      The default regex style path matcher.
  • Method Details

    • matches

      boolean matches(String pattern, String source)
      Returns true if the given source matches the specified pattern, false otherwise.
      Parameters:
      pattern - the pattern to match against
      source - the source to match
      Returns:
      true if the given source matches the specified pattern, false otherwise.