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
Modifier and TypeRequired ElementDescriptionint
The higher end of the allowed parameter count range (inclusive), orChemContext.VARARG
to signal that there is no maximum.int
The lower end of the allowed parameter count range (inclusive).String[]
The names of the functions which are registered by this annotation.
-
Element Details
-
minParameterCount
int minParameterCountThe lower end of the allowed parameter count range (inclusive). -
maxParameterCount
int maxParameterCountThe higher end of the allowed parameter count range (inclusive), orChemContext.VARARG
to signal that there is no maximum. -
names
String[] namesThe 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.
-