core/src/main/java/org/apidesign/bck2brwsr/core/JavaScriptBody.java
author Martin Soch <Martin.Soch@oracle.com>
Thu, 06 Dec 2012 09:48:24 +0100
branchbenchmarks
changeset 271 43b6795196fd
parent 94 19497b4312bb
permissions -rw-r--r--
JsTestDriver result will be always under benchmarks/.../ directory
jaroslav@106
     1
/**
jaroslav@106
     2
 * Back 2 Browser Bytecode Translator
jaroslav@106
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@106
     4
 *
jaroslav@106
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@106
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@106
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@106
     8
 *
jaroslav@106
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@106
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@106
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@106
    12
 * GNU General Public License for more details.
jaroslav@106
    13
 *
jaroslav@106
    14
 * You should have received a copy of the GNU General Public License
jaroslav@106
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@106
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@94
    17
 */
jaroslav@94
    18
package org.apidesign.bck2brwsr.core;
jaroslav@94
    19
jaroslav@94
    20
import java.lang.annotation.ElementType;
jaroslav@94
    21
import java.lang.annotation.Retention;
jaroslav@94
    22
import java.lang.annotation.RetentionPolicy;
jaroslav@94
    23
import java.lang.annotation.Target;
jaroslav@94
    24
jaroslav@94
    25
/** Put this method on a method in case it should have a special
jaroslav@94
    26
 * body in the <em>JavaScript</em>.
jaroslav@94
    27
 *
jaroslav@94
    28
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@94
    29
 */
jaroslav@94
    30
@Retention(RetentionPolicy.CLASS)
jaroslav@94
    31
@Target({ ElementType.METHOD, ElementType.CONSTRUCTOR })
jaroslav@94
    32
public @interface JavaScriptBody {
jaroslav@94
    33
    /** Names of parameters for the method. 
jaroslav@94
    34
     * 
jaroslav@94
    35
     * <!--
jaroslav@94
    36
     * If not specified
jaroslav@94
    37
     * it will be <code>arg0, arg1, arg2</code>. In case of
jaroslav@94
    38
     * instance methods, the <code>arg0</code> is reference
jaroslav@94
    39
     * to <code>this</code>.
jaroslav@94
    40
     * -->
jaroslav@94
    41
     * 
jaroslav@94
    42
     * @return array of the names of parameters for the method
jaroslav@94
    43
     *    in JavaScript
jaroslav@94
    44
     */
jaroslav@94
    45
    public String[] args();
jaroslav@94
    46
    
jaroslav@94
    47
    /** The actual body of the method in JavaScript. This string will be
jaroslav@94
    48
     * put into generated header (ends with '{') and footer (ends with '}').
jaroslav@94
    49
     */
jaroslav@94
    50
    public String body();
jaroslav@94
    51
}