Package freemarker.cache
Class FileExtensionMatcher
- java.lang.Object
-
- freemarker.cache.TemplateSourceMatcher
-
- freemarker.cache.FileExtensionMatcher
-
public class FileExtensionMatcher extends TemplateSourceMatcher
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
Constructors Constructor Description FileExtensionMatcher(java.lang.String extension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileExtensionMatchercaseInsensitive(boolean caseInsensitive)Fluid API variation ofsetCaseInsensitive(boolean)booleanisCaseInsensitive()booleanmatches(java.lang.String sourceName, java.lang.Object templateSource)voidsetCaseInsensitive(boolean caseInsensitive)Sets if the matching will be case insensitive (UNICODE compliant); default istrue.
-
-
-
Method Detail
-
matches
public boolean matches(java.lang.String sourceName, java.lang.Object templateSource) throws java.io.IOException- Throws:
java.io.IOException
-
isCaseInsensitive
public boolean isCaseInsensitive()
-
setCaseInsensitive
public void setCaseInsensitive(boolean caseInsensitive)
Sets if the matching will be case insensitive (UNICODE compliant); default istrue.
-
caseInsensitive
public FileExtensionMatcher caseInsensitive(boolean caseInsensitive)
Fluid API variation ofsetCaseInsensitive(boolean)
-
-