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 theTemplateLoader
; it's not the full path of a file on the file system.- Since:
- 2.3.24
-
-
Constructor Summary
Constructors Constructor Description PathRegexMatcher(java.lang.String regex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(java.lang.String sourceName, java.lang.Object templateSource)
-
-
-
Constructor Detail
-
PathRegexMatcher
public PathRegexMatcher(java.lang.String regex)
- Parameters:
regex
- Glob with the syntax defined byStringUtil.globToRegularExpression(String)
. Must not start with/
.
-
-