public enum NullTemplateCache extends java.lang.Enum<NullTemplateCache> implements TemplateCache
Enum Constant and Description |
---|
INSTANCE
Shared instance of null cache.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all mappings from the cache.
|
void |
evict(TemplateSource source)
Evict the mapping for this source from this cache if it is present.
|
Template |
get(TemplateSource source,
Parser parser)
Return the value to which this cache maps the specified key.
|
NullTemplateCache |
setReload(boolean reload)
Turn on/off auto reloading of templates.
|
static NullTemplateCache |
valueOf(java.lang.String name)
Returns 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.
|
public static final NullTemplateCache INSTANCE
public static NullTemplateCache[] values()
for (NullTemplateCache c : NullTemplateCache.values()) System.out.println(c);
public static NullTemplateCache valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void clear()
TemplateCache
clear
in interface TemplateCache
public void evict(TemplateSource source)
TemplateCache
evict
in interface TemplateCache
source
- the source whose mapping is to be removed from the cachepublic NullTemplateCache setReload(boolean reload)
TemplateCache
TemplateSource.lastModified()
.setReload
in interface TemplateCache
reload
- True, for turning off template reload. Default is: false.public Template get(TemplateSource source, Parser parser) throws java.io.IOException
TemplateCache
get
in interface TemplateCache
source
- source whose associated template is to be returned.parser
- The Handlebars parser.java.io.IOException
- If input can't be parsed.Copyright © 2010 - 2020 Adobe. All Rights Reserved