public interface SubTemplateProvider
Note that it is usually a good idea to use a cache, see
| Modifier and Type | Field and Description |
|---|---|
static SubTemplateProvider |
NO_SUBS |
| Modifier and Type | Method and Description |
|---|---|
Template |
resolveTemplate(java.lang.String mark)
Resolve a template.
|
default SubTemplateProvider |
withCache()
Wrap this subtemplate provider with a one using a cache.
|
static final SubTemplateProvider NO_SUBS
@NotNull Template resolveTemplate(@NotNull java.lang.String mark) throws java.io.IOException
mark - mark to resolvejava.io.IOException - on read or parse errors@NotNull default SubTemplateProvider withCache()
This will call this provider only once for each mark, and internally cache its return. If the returned provider is called twice or more with the same mark, the cached template is returned. This speeds up evaluation and decreases memory usage if templates are inserted more than once.