Annotation Type JsMethod


  • @Retention(RUNTIME)
    @Target(METHOD)
    @Documented
    public @interface JsMethod
    JsMethod marks a method that will be directly translated into a JavaScript method preserving its name.

    Note: In JavaScript, instance members are defined on the prototype and class members are defined on the constructor function of the type.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String name
      Customizes the name of the member in generated JavaScript.
      java.lang.String namespace
      Customizes the namespace of the static member in generated JavaScript.
    • Element Detail

      • name

        java.lang.String name
        Customizes the name of the member in generated JavaScript. If not provided, the Java name will be used.
        Default:
        "<auto>"
      • namespace

        java.lang.String namespace
        Customizes the namespace of the static member in generated JavaScript. If none is provided, namespace is the enclosing class' fully qualified JavaScript name.
        Default:
        "<auto>"