com.google.clearsilver.jsilver.precompiler
Class PrecompiledTemplateMapFileReader
java.lang.Object
com.google.clearsilver.jsilver.precompiler.PrecompiledTemplateMapFileReader
public class PrecompiledTemplateMapFileReader
- extends Object
Utility class that reads in the file output by BatchCompiler that is a list of template names and
corresponding class names and returns a Map of template filenames to class names which can be fed
to JSilverOptions.setPrecompiledTemplateMap(java.util.Map)
Constructor Summary |
PrecompiledTemplateMapFileReader(String filename,
String dirPattern,
String rootDir)
Helper object that reads in the specified resource file and generates a mapping of template
filenames to corresponding BaseCompiledTemplate class names. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrecompiledTemplateMapFileReader
public PrecompiledTemplateMapFileReader(String filename,
String dirPattern,
String rootDir)
- Helper object that reads in the specified resource file and generates a mapping of template
filenames to corresponding BaseCompiledTemplate class names.
- Parameters:
filename
- name of the resource file to read the map from.dirPattern
- prefix to remove from read in template names. Used in conjunction with
rootDir to update template file paths.rootDir
- optional string to prepend to all non-absolute template filenames. Should be set
to the location of the templates in production via a flag.
getTemplateMap
public Map<Object,String> getTemplateMap()
throws IOException
- Throws:
IOException
getMapFileReader
protected Reader getMapFileReader(String templateMapFile)
throws IOException
- Throws:
IOException
Copyright © 2010-2012 Google. All Rights Reserved.