|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jelly.apt.freemarker.FreemarkerTransform<S>
public abstract class FreemarkerTransform<S extends TemplateStrategyControl>
Base class for freemarker transforms.
Field Summary |
---|
Fields inherited from interface freemarker.template.TemplateModel |
---|
NOTHING |
Constructor Summary | |
---|---|
protected |
FreemarkerTransform(java.lang.String namespace)
Construct a new transform under the specified namespace. |
Method Summary | |
---|---|
protected java.lang.Object |
convertString(java.lang.String value,
java.lang.Class toClass)
Attempts to convert a string value to a given class using the "valueOf" method or "fromString" method. |
protected java.lang.reflect.Method |
findSetter(java.lang.String property,
S strategy)
Finds the setter for the given property on the specified strategy. |
java.lang.String |
getTransformName()
The name of the transform. |
java.lang.String |
getTransformNamespace()
The namespace of the transform. |
java.io.Writer |
getWriter(java.io.Writer out,
java.util.Map args)
|
abstract S |
newStrategy()
Instantiate a new strategy instance. |
protected void |
setupStrategy(S strategy,
java.util.Map args)
Setup the strategy given the specified arguments to the template transform. |
protected java.lang.Object |
unwrap(freemarker.template.TemplateModel value,
java.lang.String property)
Unwrap the specified value of the given property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FreemarkerTransform(java.lang.String namespace)
null
or ""
means the root namespace.
namespace
- The namespace.Method Detail |
---|
public java.io.Writer getWriter(java.io.Writer out, java.util.Map args) throws freemarker.template.TemplateModelException, java.io.IOException
getWriter
in interface freemarker.template.TemplateTransformModel
freemarker.template.TemplateModelException
java.io.IOException
protected void setupStrategy(S strategy, java.util.Map args) throws freemarker.template.TemplateModelException
strategy
- The strategy to set up.args
- The arguments to the transform.
freemarker.template.TemplateModelException
protected java.lang.Object convertString(java.lang.String value, java.lang.Class toClass)
value
- The value to convert.toClass
- The class to convert to.protected java.lang.Object unwrap(freemarker.template.TemplateModel value, java.lang.String property) throws freemarker.template.TemplateModelException
value
- The value to unwrap.property
- The property.
freemarker.template.TemplateModelException
protected java.lang.reflect.Method findSetter(java.lang.String property, S strategy) throws freemarker.template.TemplateModelException
property
- The property.strategy
- The strategy.
freemarker.template.TemplateModelException
public abstract S newStrategy()
public java.lang.String getTransformName()
public java.lang.String getTransformNamespace()
null
or ""
means the root namespace.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |