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(String glob) |
| Modifier and Type | Method and Description |
|---|---|
FileNameGlobMatcher |
caseInsensitive(boolean caseInsensitive)
Fluid API variation of
setCaseInsensitive(boolean) |
boolean |
isCaseInsensitive() |
boolean |
matches(String sourceName,
Object templateSource) |
void |
setCaseInsensitive(boolean caseInsensitive)
Sets if the matching will be case insensitive (UNICODE compliant); default is
false. |
public FileNameGlobMatcher(String glob)
glob - Glob with the syntax defined by StringUtil.globToRegularExpression(String, boolean). Must not
start with /.public boolean matches(String sourceName, Object templateSource) throws IOException
IOExceptionpublic boolean isCaseInsensitive()
public void setCaseInsensitive(boolean caseInsensitive)
false.public FileNameGlobMatcher caseInsensitive(boolean caseInsensitive)
setCaseInsensitive(boolean)