Package freemarker.cache
Class FileExtensionMatcher
java.lang.Object
freemarker.cache.TemplateSourceMatcher
freemarker.cache.FileExtensionMatcher
Matches the file extension; unlike other matchers, by default case insensitive. A name (a path) is
considered to have the given extension exactly if it ends with a dot plus the extension.
- Since:
- 2.3.24
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncaseInsensitive(boolean caseInsensitive)
Fluid API variation ofsetCaseInsensitive(boolean)
boolean
boolean
void
setCaseInsensitive(boolean caseInsensitive)
Sets if the matching will be case insensitive (UNICODE compliant); default istrue
.
-
Constructor Details
-
FileExtensionMatcher
- Parameters:
extension
- The file extension (without the initial dot). Can't contain there characters:'/'
,'*'
,'?'
. May contains'.'
, but can't start with it.
-
-
Method Details
-
matches
- Throws:
IOException
-
isCaseInsensitive
public boolean isCaseInsensitive() -
setCaseInsensitive
public void setCaseInsensitive(boolean caseInsensitive)Sets if the matching will be case insensitive (UNICODE compliant); default istrue
. -
caseInsensitive
Fluid API variation ofsetCaseInsensitive(boolean)
-