In package com.mitchellbosecke.pebble.loader
public class DelegatingLoader extends Object implements Loader
This loader will delegate control to a list of children loaders. This is the default implementation used by Pebble; it delegates to a classpath loader and a file loader to increase the chances of finding templates with varying setups.
Constructors
public DelegatingLoader(List<Loader<?>> loaders)
Constructor provided with a list of children loaders.
Parameters:
-
List<Loader<?>> loaders
A list of loaders to delegate to
Methods
public Reader getReader(DelegatingLoaderCacheKey cacheKey)
Parameters:
-
DelegatingLoaderCacheKey cacheKey
public String getSuffix()
Parameters:
- No parameters
public void setSuffix(String suffix)
Parameters:
-
String suffix
public String getPrefix()
Parameters:
- No parameters
public void setPrefix(String prefix)
Parameters:
-
String prefix
public String getCharset()
Parameters:
- No parameters
public void setCharset(String charset)
Parameters:
-
String charset
public String resolveRelativePath(String relativePath, String anchorPath)
Parameters:
-
String relativePath
-
String anchorPath
public boolean resourceExists(String templateName)
Parameters:
-
String templateName