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