public class FileNameGlobMatcher extends TemplateSourceMatcher
PathGlobMatcher, it only compares the "file name" part (the part after the last /) of
the source name with the given glob. For example, the file name glob *.ftlh matches both foo.ftlh and
foo/bar.ftlh. With other words, that file name glob is equivalent with the **/*.ftlh)
path glob ( PathGlobMatcher).| Constructor and Description |
|---|
FileNameGlobMatcher(java.lang.String glob) |
| Modifier and Type | Method and Description |
|---|---|
FileNameGlobMatcher |
caseInsensitive(boolean caseInsensitive)
Fluid API variation of
setCaseInsensitive(boolean) |
boolean |
isCaseInsensitive() |
boolean |
matches(java.lang.String sourceName,
java.lang.Object templateSource) |
void |
setCaseInsensitive(boolean caseInsensitive)
Sets if the matching will be case insensitive (UNICODE compliant); default is
false. |
public FileNameGlobMatcher(java.lang.String glob)
glob - Glob with the syntax defined by StringUtil.globToRegularExpression(String, boolean). Must not
start with /.public boolean matches(java.lang.String sourceName,
java.lang.Object templateSource)
throws java.io.IOException
java.io.IOExceptionpublic boolean isCaseInsensitive()
public void setCaseInsensitive(boolean caseInsensitive)
false.public FileNameGlobMatcher caseInsensitive(boolean caseInsensitive)
setCaseInsensitive(boolean)