com.streambase.sb.client

## Annotation Type CustomFunctionResolver

-     @Retention(value=RUNTIME)
       @Target(value=java.lang.annotation.ElementType.METHOD)
      public @interface CustomFunctionResolver

  A Java annotation that can be used on a method, M, that implements a StreamBase Java custom function. The value of the annotation must be a String whose value is the name of another method, R, in the same class as M.

  Constraints on R's declaration:

  - R must be public and static.
  - R must take the same number of arguments as M.
  - All of R's arguments must be of type `CompleteDataType`
  - R's return type must be CompleteDataType.

  StreamBase calls R under one of the following circumstances:

  - A custom function call passes one or more parameters of StreamBase type List or Tuple.
  - A custom function returns a value whose Java type is `List` or `Tuple`.
  - A custom function call matches multiple Java functions (e.g., calljava is called with a StreamBase long value and there are two identically-named Java methods, one of which takes a Java long and one of which takes a Java Long.
  In these cases, StreamBase (as part of typechecking an application that calls custom Java functions) calls each appropriate R, supplying CompleteDataType values that describe the types of the actual parameters used in the custom function call. R must return either:

  - A CompleteDataType that describes the type of M's return value (note: the CompleteDataType must be consistent with M's actual return type), or
  - `null` if M can not be called with actual parameters of the specified types (e.g., because the schema of a tuple argument doesn't match the function's requirements).
  Since:
    6.3

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `String` | `value`

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String[]` | `args`

- - ### Element Detail

    - #### value

          public abstract String value

  - - #### args

          public abstract String[] args

      Default:
        {}

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.