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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
call(java.lang.Object... arguments)
A simple function call.java.lang.String
getName()
Name of the function used as function identifier.
-
-
-
Method Detail
-
call
java.lang.Object call(java.lang.Object... arguments) throws java.lang.IllegalArgumentException
A simple function call.- Parameters:
arguments
- array of arguments, never null.- Returns:
- a simple value to insert in the template file.
- Throws:
java.lang.IllegalArgumentException
- when argument count or argument types are unexpected.
-
getName
java.lang.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
-
-