public class PrecompiledTemplateMapFileReader extends Object
JSilverOptions.setPrecompiledTemplateMap(java.util.Map<java.lang.Object, java.lang.String>)
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
protected Reader |
getMapFileReader(String templateMapFile) |
Map<Object,String> |
getTemplateMap() |
public PrecompiledTemplateMapFileReader(String filename, String dirPattern, String rootDir)
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.public Map<Object,String> getTemplateMap() throws IOException
IOException
protected Reader getMapFileReader(String templateMapFile) throws IOException
IOException
Copyright © 2010–2016 Google. All rights reserved.