Enum NullTemplateCache
- All Implemented Interfaces:
TemplateCache,Serializable,Comparable<NullTemplateCache>,java.lang.constant.Constable
Null cache implementation.
- Since:
- 0.11.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Remove all mappings from the cache.voidevict(TemplateSource source) Evict the mapping for this source from this cache if it is present.get(TemplateSource source, Parser parser) Return the value to which this cache maps the specified key.setReload(boolean reload) Turn on/off auto reloading of templates.static NullTemplateCacheReturns the enum constant of this type with the specified name.static NullTemplateCache[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
INSTANCE
Shared instance of null cache.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
clear
public void clear()Description copied from interface:TemplateCacheRemove all mappings from the cache.- Specified by:
clearin interfaceTemplateCache
-
evict
Description copied from interface:TemplateCacheEvict the mapping for this source from this cache if it is present.- Specified by:
evictin interfaceTemplateCache- Parameters:
source- the source whose mapping is to be removed from the cache
-
setReload
Description copied from interface:TemplateCacheTurn on/off auto reloading of templates. Auto reload is done usingTemplateSource.lastModified().- Specified by:
setReloadin interfaceTemplateCache- Parameters:
reload- True, for turning off template reload. Default is: false.- Returns:
- This template loader.
-
get
Description copied from interface:TemplateCacheReturn the value to which this cache maps the specified key.- Specified by:
getin interfaceTemplateCache- Parameters:
source- source whose associated template is to be returned.parser- The Handlebars parser.- Returns:
- A template.
- Throws:
IOException- If input can't be parsed.
-