Annotation Type Import


@Retention(CLASS) @Target(METHOD) public @interface Import
Mark a function as an import from host environment/JavaScript.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The JavaScript replacement.
    The module/object name of the import.
    The function name in the scope of the module.
  • Element Details

    • module

      String module
      The module/object name of the import. If not set then the simple class name is used.
      Returns:
      the module name
      Default:
      ""
    • name

      String name
      The function name in the scope of the module. If not set then the method name is used.
      Returns:
      the name
      Default:
      ""
    • js

      String js
      The JavaScript replacement. If empty then there must be a same naming object in JavaScript.
      Returns:
      JavaScript replacement. This is the body of the function.
      Default:
      ""