PathRegexMatcher (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.cache, class: PathRegexMatcher

Package freemarker.cache

# Class PathRegexMatcher

java.lang.Object
freemarker.cache.TemplateSourceMatcher
freemarker.cache.PathRegexMatcher

public class PathRegexMatcher extends TemplateSourceMatcher
Matches the whole template source name (also known as template source path) with the given regular expression. Note that the template source name is relative to the template storage root defined by the `TemplateLoader`; it's not the full path of a file on the file system.

Since:
  2.3.24

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PathRegexMatcher​(String regex)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `matches​(String sourceName, Object templateSource)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PathRegexMatcher

    public PathRegexMatcher​(String regex)
    Parameters:
      `regex` - Glob with the syntax defined by `StringUtil.globToRegularExpression(String)`. Must not start with `/`.

- ## Method Details

  - ### matches

    public boolean matches​(String sourceName, Object templateSource) throws IOException
    Throws:
      `IOException`