-
@Retention(RUNTIME) @Target(METHOD) public @interface Function
Indicates that a method returns a ScalarValuedFunction and should be included in the FunctionRegistry or returns an Aggregation and should be included in the AggregationRegistry.
-
-
Field Summary
Fields Modifier and Type Fields Description static int
DEFAULT_ARGUMENT_COUNT
Indicates that the number of function arguments matches the number of method arguments.static String
DEFAULT_CATEGORY
static String
DEFAULT_NAME
static int
VARIABLE_ARGUMENT_COUNT
Indicates that the number of function arguments is variable.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description int
argumentCount
The number of arguments this function takes.String[]
argumentNames
The names of the arguments for this function.
Names are usually specified for each argument individually with theFunctionArgument
annotation.String
category
The category of this function.String
description
The description of this function.Class<? extends FunctionInvoker>
invoker
The invoker to use for this function.String
name
The name of this function.
-
-
-
-
DEFAULT_NAME
static final String DEFAULT_NAME
-
-
-
DEFAULT_CATEGORY
static final String DEFAULT_CATEGORY
-
-
Element Detail
-
name
String name
The name of this function. If unspecified, defaults to the method name.- Default:
- ""
-
-
-
invoker
Class<? extends FunctionInvoker> invoker
The invoker to use for this function. If unspecified, defaults toDefaultFunctionInvoker
.- Default:
- com.pervasive.datarush.functions.DefaultFunctionInvoker.class
-
-
-
argumentCount
int argumentCount
The number of arguments this function takes. If unspecified, defaults to the number of arguments the method takes.
Valid values are positive integers,DEFAULT_ARGUMENT_COUNT
, orVARIABLE_ARGUMENT_COUNT
.- Default:
- -1
-
-
-
description
String description
The description of this function.- Default:
- ""
-
-
-
category
String category
The category of this function.- Default:
- ""
-
-
-
argumentNames
String[] argumentNames
The names of the arguments for this function.
Names are usually specified for each argument individually with theFunctionArgument
annotation. Use this property if the number of function arguments does not match the number of method arguments.- Default:
- {}
-
-