rt/vm/src/test/java/org/apidesign/vm4brwsr/HtmlAnnotations.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 09 Jul 2013 21:06:35 +0200
changeset 1239 b6317079abe1
child 1240 1ffdca0ec6a3
permissions -rw-r--r--
Basic support for net.java.html.js annotations
jaroslav@1239
     1
/**
jaroslav@1239
     2
 * Back 2 Browser Bytecode Translator
jaroslav@1239
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@1239
     4
 *
jaroslav@1239
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@1239
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@1239
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@1239
     8
 *
jaroslav@1239
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@1239
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@1239
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@1239
    12
 * GNU General Public License for more details.
jaroslav@1239
    13
 *
jaroslav@1239
    14
 * You should have received a copy of the GNU General Public License
jaroslav@1239
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@1239
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@1239
    17
 */
jaroslav@1239
    18
package org.apidesign.vm4brwsr;
jaroslav@1239
    19
jaroslav@1239
    20
import net.java.html.js.JavaScriptBody;
jaroslav@1239
    21
import net.java.html.js.JavaScriptResource;
jaroslav@1239
    22
jaroslav@1239
    23
/**
jaroslav@1239
    24
 *
jaroslav@1239
    25
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@1239
    26
 */
jaroslav@1239
    27
@JavaScriptResource("htmlannotations.js")
jaroslav@1239
    28
public class HtmlAnnotations {
jaroslav@1239
    29
    @JavaScriptBody(args = {}, body = "return 42;")
jaroslav@1239
    30
    public static int fourtyTwo() {
jaroslav@1239
    31
        return -1;
jaroslav@1239
    32
    }
jaroslav@1239
    33
    
jaroslav@1239
    34
    @JavaScriptBody(args = { "x", "y" }, body = "return mul(x, y);")
jaroslav@1239
    35
    public static native int useExternalMul(int x, int y);
jaroslav@1239
    36
    
jaroslav@1239
    37
}