com.google.clearsilver.jsilver.interpreter
Class LoadingTemplateFactory

java.lang.Object
  extended by com.google.clearsilver.jsilver.interpreter.LoadingTemplateFactory
All Implemented Interfaces:
TemplateFactory

public class LoadingTemplateFactory
extends Object
implements TemplateFactory

Loads a template from disk, and parses it into an AST. Does not do any caching.


Constructor Summary
LoadingTemplateFactory()
           
 
Method Summary
 TemplateSyntaxTree createTemp(String content, EscapeMode escapeMode)
          Create a temporary template from content.
 TemplateSyntaxTree find(String templateName, ResourceLoader resourceLoader, EscapeMode escapeMode)
          Load a template from the source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadingTemplateFactory

public LoadingTemplateFactory()
Method Detail

find

public TemplateSyntaxTree find(String templateName,
                               ResourceLoader resourceLoader,
                               EscapeMode escapeMode)
Description copied from interface: TemplateFactory
Load a template from the source.

Specified by:
find in interface TemplateFactory
Parameters:
templateName - e.g. some/path/to/template.cs
resourceLoader - use this ResourceLoader to locate the named template file and any included files.
escapeMode - the type of escaping to apply to the entire template.

createTemp

public TemplateSyntaxTree createTemp(String content,
                                     EscapeMode escapeMode)
Description copied from interface: TemplateFactory
Create a temporary template from content.

Specified by:
createTemp in interface TemplateFactory
Parameters:
content - e.g. "Hello <cs var:name >"


Copyright © 2010-2012 Google. All Rights Reserved.