core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptBody.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 09 Oct 2012 11:11:58 -0700
branchemul
changeset 94 19497b4312bb
child 106 346633cd13d6
permissions -rw-r--r--
Concatenation of string and integer works
     1 /*
     2  * To change this template, choose Tools | Templates
     3  * and open the template in the editor.
     4  */
     5 package org.apidesign.bck2brwsr.core;
     6 
     7 import java.lang.annotation.ElementType;
     8 import java.lang.annotation.Retention;
     9 import java.lang.annotation.RetentionPolicy;
    10 import java.lang.annotation.Target;
    11 
    12 /** Put this method on a method in case it should have a special
    13  * body in the <em>JavaScript</em>.
    14  *
    15  * @author Jaroslav Tulach <jtulach@netbeans.org>
    16  */
    17 @Retention(RetentionPolicy.CLASS)
    18 @Target({ ElementType.METHOD, ElementType.CONSTRUCTOR })
    19 public @interface JavaScriptBody {
    20     /** Names of parameters for the method. 
    21      * 
    22      * <!--
    23      * If not specified
    24      * it will be <code>arg0, arg1, arg2</code>. In case of
    25      * instance methods, the <code>arg0</code> is reference
    26      * to <code>this</code>.
    27      * -->
    28      * 
    29      * @return array of the names of parameters for the method
    30      *    in JavaScript
    31      */
    32     public String[] args();
    33     
    34     /** The actual body of the method in JavaScript. This string will be
    35      * put into generated header (ends with '{') and footer (ends with '}').
    36      */
    37     public String body();
    38 }