Package chemaxon.jep

Annotation Interface ChemContext.ProvidesFunction

Enclosing interface:
ChemContext

@PublicApi @Documented @Target(TYPE) @Retention(RUNTIME) @Repeatable(ProvidesFunctionContainer.class) public static @interface ChemContext.ProvidesFunction
Repeatable annotation used on ChemContext implementations to declare the context functions supported by the ChemContext.callContextFunction(String, List) method.

Apart from the names of the functions, the minimum and maximum number of allowed parameters are also specified, and the evaluator engine will validate these constraints during the compilation of an expression.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    The higher end of the allowed parameter count range (inclusive), or ChemContext.VARARG to signal that there is no maximum.
    int
    The lower end of the allowed parameter count range (inclusive).
    The names of the functions which are registered by this annotation.
  • Element Details

    • minParameterCount

      int minParameterCount
      The lower end of the allowed parameter count range (inclusive).
    • maxParameterCount

      int maxParameterCount
      The higher end of the allowed parameter count range (inclusive), or ChemContext.VARARG to signal that there is no maximum.
    • names

      String[] names
      The names of the functions which are registered by this annotation. Functions with the same allowed parameter counts can be grouped together to reduce boilerplate. Declaring functions one-by-one or in a single annotation is equivalent.