public class MapTemplateLocator extends AbstractTemplateLocator
Map
.Modifier and Type | Class and Description |
---|---|
static class |
MapTemplateLocator.Builder |
configuration
DEFAULT_PRIORITY
Constructor and Description |
---|
MapTemplateLocator(int priority,
Map<String,String> templates) |
MapTemplateLocator(Map<String,String> templates) |
Modifier and Type | Method and Description |
---|---|
static MapTemplateLocator.Builder |
builder() |
Set<String> |
getAllIdentifiers()
This method should return an empty set if it's not possible to collect the names/identifiers.
|
Reader |
locate(String templateName)
The reader is always closed by the engine right after the template source is read.
|
String |
toString() |
getPriority
checkNotInitialized, init, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getConfigurationKeys, init
public MapTemplateLocator(int priority, Map<String,String> templates)
priority
- templates
- public Reader locate(String templateName)
TemplateLocator
templateName
- The template identifiernull
if no available template with the given name
existsMustache.getName()
public Set<String> getAllIdentifiers()
TemplateLocator
EngineConfigurationKey.PRECOMPILE_ALL_TEMPLATES
public static MapTemplateLocator.Builder builder()
Copyright © 2017. All rights reserved.