Package com.github.jknack.handlebars.io
Class ForwardingTemplateSource
- java.lang.Object
-
- com.github.jknack.handlebars.io.AbstractTemplateSource
-
- com.github.jknack.handlebars.io.ForwardingTemplateSource
-
- All Implemented Interfaces:
TemplateSource
- Direct Known Subclasses:
ReloadableTemplateSource
public class ForwardingTemplateSource extends AbstractTemplateSource
A template source which forwards all its method calls to another template source..- Since:
- 0.11.0
-
-
Constructor Summary
Constructors Constructor Description ForwardingTemplateSource(TemplateSource source)Creates a newForwardingTemplateSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringcontent(java.nio.charset.Charset charset)The template content.java.lang.Stringfilename()The file's name.longlastModified()The last modified date.-
Methods inherited from class com.github.jknack.handlebars.io.AbstractTemplateSource
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
ForwardingTemplateSource
public ForwardingTemplateSource(TemplateSource source)
Creates a newForwardingTemplateSource.- Parameters:
source- The template source to forwards all the method calls.
-
-
Method Detail
-
content
public java.lang.String content(java.nio.charset.Charset charset) throws java.io.IOExceptionDescription copied from interface:TemplateSourceThe template content.- Parameters:
charset- Charset to use.- Returns:
- The template content.
- Throws:
java.io.IOException- If the template can't read.
-
filename
public java.lang.String filename()
Description copied from interface:TemplateSourceThe file's name.- Returns:
- The file's name.
-
lastModified
public long lastModified()
Description copied from interface:TemplateSourceThe last modified date.- Returns:
- The last modified date.
-
-