Annotation Interface JsExpression


@Documented @Target(METHOD) @Retention(RUNTIME) public @interface JsExpression
The JavaScript that a method of a JavaScript definition runs, as a constant expression.

The annotated method is called through Element.executeJs(Class). Its arguments are the parameters of the expression, referenced positionally as $0, $1, …, and the element the definition was obtained from is this — the same contract as Element.executeJs(String, Object...), except that the expression is a constant of the interface instead of a string built at the call site.

Since:
25.4
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The JavaScript expression to run.
  • Element Details

    • value

      String value
      The JavaScript expression to run.
      Returns:
      the expression