xv.text.template
Class StringTemplateElement
java.lang.Object
xv.text.template.TemplateElement
xv.text.template.StringTemplateElement
public final class StringTemplateElement
- extends TemplateElement
Very simple template element that always appends a static string.
- Author:
- dmpotter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringTemplateElement
public StringTemplateElement(String content)
execute
public TemplateElement execute(TemplateEnvironment environment,
Appendable out)
throws TemplateException,
IOException
- Description copied from class:
TemplateElement
- Execute the current token.
- Specified by:
execute
in class TemplateElement
- Parameters:
environment
- the environment to useout
- the appendable to write the generated text to
- Returns:
- the next template element to execute, or
null
to end the
template execution - generally subclasses should just return
TemplateElement.nextElement
unless they implement some sort of flow
control
- Throws:
TemplateException
- if an error occurs within the templating system
IOException
- if an I/O error occurs - this should never be thrown by
an implementation directly, solely by the Appendable
being written to
Copyright © 2008-2011. All Rights Reserved.