Annotation Type 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 Detail

      • DEFAULT_ARGUMENT_COUNT

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

        static final int VARIABLE_ARGUMENT_COUNT
        Indicates that the number of function arguments is variable.
      • 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:
        ""
      • 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:
        {}