Package org.teavm.jso

Annotation Type JSIndexer


@Retention(RUNTIME) @Target(METHOD) public @interface JSIndexer

Marks abstract member method either as an getter indexer or setter indexer.

Getter indexer is a method that returns value and takes exactly one parameter. In this case annotation is equivalent to this:

 @JSBody(params = "index", script = "return this[index];")
 

Setter indexer is a method that takes two parameter and does not return any value. Ins this case annotation is equivalent to the following:

 @JSBody(params = { "index", "value" }, script = "this[index] = value;")
 
Author:
Alexey Andreev