Annotation Interface Function


@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 Details

    • DEFAULT_ARGUMENT_COUNT

      static final int DEFAULT_ARGUMENT_COUNT
      Indicates that the number of function arguments matches the number of method arguments.
      See Also:
    • VARIABLE_ARGUMENT_COUNT

      static final int VARIABLE_ARGUMENT_COUNT
      Indicates that the number of function arguments is variable.
      See Also:
    • DEFAULT_NAME

      static final String DEFAULT_NAME
      See Also:
    • DEFAULT_CATEGORY

      static final String DEFAULT_CATEGORY
      See Also:
  • Element Details

    • 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 to DefaultFunctionInvoker.
      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, or VARIABLE_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 the FunctionArgument annotation. Use this property if the number of function arguments does not match the number of method arguments.
      Default:
      {}