Class AntPathMatcher.AntPathStringMatcher

java.lang.Object
com.igormaznitsa.jcp.utils.antpathmatcher.AntPathMatcher.AntPathStringMatcher
Enclosing class:
AntPathMatcher

protected static class AntPathMatcher.AntPathStringMatcher extends Object
Tests whether or not a string matches against a pattern via a Pattern.

The pattern may contain special characters: '*' means zero or more characters; '?' means one and only one character; '{' and '}' indicate a URI template pattern. For example /users/{user}.

  • Field Details

    • GLOB_PATTERN

      private static final Pattern GLOB_PATTERN
    • DEFAULT_VARIABLE_PATTERN

      private static final String DEFAULT_VARIABLE_PATTERN
      See Also:
    • pattern

      private final Pattern pattern
    • variableNames

      private final List<String> variableNames
  • Constructor Details

    • AntPathStringMatcher

      public AntPathStringMatcher(String pattern)
    • AntPathStringMatcher

      public AntPathStringMatcher(String pattern, boolean caseSensitive)
  • Method Details

    • quote

      private String quote(String s, int start, int end)
    • matchStrings

      public boolean matchStrings(String str, Map<String,String> uriTemplateVariables)
      Main entry point.
      Returns:
      true if the string matches against the pattern, or false otherwise.