Package io.github.erdos.stencil.impl
Class CachingTemplateFactory
java.lang.Object
io.github.erdos.stencil.impl.CachingTemplateFactory
- All Implemented Interfaces:
- TemplateFactory
Wraps a TemplateFactory instance and proxies calls only iff template file has not been changed since last call.
- 
Constructor SummaryConstructorsConstructorDescriptionCachingTemplateFactory(TemplateFactory templateFactory) Constructs a new wrapping instance.
- 
Method SummaryModifier and TypeMethodDescriptionprepareTemplateFile(File templateFile, PrepareOptions options) Preprocesses a raw template file.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.erdos.stencil.TemplateFactoryprepareTemplateFile
- 
Constructor Details- 
CachingTemplateFactoryConstructs a new wrapping instance. Caches in memory.- Parameters:
- templateFactory- instance to wrap
- Throws:
- IllegalArgumentException- on null input.
 
 
- 
- 
Method Details- 
prepareTemplateFilepublic PreparedTemplate prepareTemplateFile(File templateFile, PrepareOptions options) throws IOException Description copied from interface:TemplateFactoryPreprocesses a raw template file.- Specified by:
- prepareTemplateFilein interface- TemplateFactory
- Parameters:
- templateFile- raw template file of known type.
- options- template preparation options.
- Returns:
- preprocessed template file
- Throws:
- IOException- on file system error
- FileNotFoundException- when file does not exist
 
 
-