Interface Function

All Known Implementing Classes:
BasicFunctions, DateFunctions, LocaleFunctions, NumberFunctions, StringFunctions

public interface Function
A function object can be called from inside a template file.

Function calls should return simple values that can be embedded in the document: numbers, bools, strings.

  • Method Summary

    Modifier and Type
    Method
    Description
    call(Object... arguments)
    A simple function call.
    Name of the function used as function identifier.
  • Method Details

    • call

      Object call(Object... arguments) throws IllegalArgumentException
      A simple function call.
      Parameters:
      arguments - array of arguments, never null.
      Returns:
      a simple value to insert in the template file.
      Throws:
      IllegalArgumentException - when argument count or argument types are unexpected.
    • getName

      String getName()
      Name of the function used as function identifier.

      Must not contain whitespaces. Must not be empty. Must not change. It is used to look up the function from the template file.

      Returns:
      function identifier