Save This Page
Home » freemarker-2.3.13 » freemarker.core » [javadoc | source]
freemarker.core
class: Interpret [javadoc | source]
java.lang.Object
   freemarker.core.TemplateObject
      freemarker.core.Expression
         freemarker.core.BuiltIn
            freemarker.core.Interpret

All Implemented Interfaces:
    Cloneable

A method that takes a parameter and evaluates it as a scalar, then treats that scalar as template source code and returns a transform model that evaluates the template in place. The template inherits the configuration and environment of the executing template. By default, its name will be equal to executingTemplate.getName() + "$anonymous_interpreted". You can specify another parameter to the method call in which case the template name suffix is the specified id instead of "anonymous_interpreted".
Fields inherited from freemarker.core.BuiltIn:
target,  key,  builtins
Fields inherited from freemarker.core.Expression:
constantValue
Fields inherited from freemarker.core.TemplateObject:
beginColumn,  beginLine,  endColumn,  endLine
Method from freemarker.core.Interpret Summary:
_getAsTemplateModel
Methods from freemarker.core.BuiltIn:
_deepClone,   getCanonicalForm,   isLiteral,   newBuiltIn
Methods from freemarker.core.Expression:
_deepClone,   _getAsTemplateModel,   deepClone,   getAsTemplateModel,   getStringValue,   getStringValue,   isEmpty,   isLiteral,   isTrue,   setLocation
Methods from freemarker.core.TemplateObject:
assertNonNull,   contains,   copyLocationFrom,   getBeginColumn,   getBeginLine,   getCanonicalForm,   getEndColumn,   getEndLine,   getEndLocation,   getSource,   getStartLocation,   getTemplate,   invalidTypeException,   setLocation,   setLocation,   setLocation,   setLocation,   setLocation,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.core.Interpret Detail:
 TemplateModel _getAsTemplateModel(Environment env) throws TemplateException 
    Constructs a template on-the-fly and returns it embedded in a TemplateTransformModel .

    The built-in has two arguments: the arguments passed to the method. It can receive at least one and at most two arguments, both must evaluate to a scalar. The first scalar is interpreted as a template source code and a template is built from it. The second (optional) is used to give the generated template a name.