RhinoFunctionModel (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.ext.rhino, class: RhinoFunctionModel

Package freemarker.ext.rhino

# Class RhinoFunctionModel

java.lang.Object
freemarker.ext.rhino.RhinoScriptableModel
freemarker.ext.rhino.RhinoFunctionModel

All Implemented Interfaces:
  `AdapterTemplateModel`, `TemplateBooleanModel`, `TemplateHashModel`, `TemplateHashModelEx`, `TemplateMethodModel`, `TemplateMethodModelEx`, `TemplateModel`, `TemplateNumberModel`, `TemplateScalarModel`, `TemplateSequenceModel`

public class RhinoFunctionModel extends RhinoScriptableModel implements TemplateMethodModelEx

- ## Field Summary

  ### Fields inherited from interface freemarker.template.TemplateBooleanModel

  `FALSE, TRUE`

  ### Fields inherited from interface freemarker.template.TemplateModel

  `NOTHING`

  ### Fields inherited from interface freemarker.template.TemplateScalarModel

  `EMPTY_STRING`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RhinoFunctionModel​(org.mozilla.javascript.Function function, org.mozilla.javascript.Scriptable fnThis, BeansWrapper wrapper)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `exec​(List arguments)`
  Executes the method call.

  ### Methods inherited from class freemarker.ext.rhino.RhinoScriptableModel

  `get, get, getAdaptedObject, getAsBoolean, getAsNumber, getAsString, isEmpty, keys, size, values`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RhinoFunctionModel

    public RhinoFunctionModel​(org.mozilla.javascript.Function function, org.mozilla.javascript.Scriptable fnThis, BeansWrapper wrapper)

- ## Method Details

  - ### exec

    public Object exec​(List arguments) throws TemplateModelException
    Description copied from interface: `TemplateMethodModelEx`
    Executes the method call.
    Specified by:
      `exec` in interface `TemplateMethodModel`
    Specified by:
      `exec` in interface `TemplateMethodModelEx`
    Parameters:
      `arguments` - a `List` of `TemplateModel`-s, containing the arguments passed to the method. If the implementation absolutely wants to operate on POJOs, it can use the static utility methods in the `DeepUnwrap` class to easily obtain them. However, unwrapping is not always possible (or not perfectly), and isn't always efficient, so it's recommended to use the original `TemplateModel` value as much as possible.
    Returns:
      the return value of the method, or `null`. If the returned value does not implement `TemplateModel`, it will be automatically wrapped using the `environment's object wrapper`.
    Throws:
      `TemplateModelException`